I've been banging my head against this for 3 days now.
I have configured a virtual entity to use the OData provider. The data comes through the wire, however I only see 1 record in the model driven views.
If I perform an advanced search with no filters, I get a repetition of a single record's data repeated 50 times.
I have enabled ASP.NET logging on the OData backend so I can see all queries being performed by CDS. for example:
https://myservice/Clientes?$top=50&$select=CdsId,NroSocio,Nombre,Apellido
Doing this same exact request using Postman I get all data correctly from the server. No repeated records, no missing information.
I honestly don't know what else I can try. I'm about to give it all up and implement my own data provider and ditch the OData stuff entirely.
I could include more details and the code I'm using, but I can't stand this forum and I sincerely can't understand why we're not doing this on Github where it really belongs. I'm terribly frustrated atm.
Edit: OMG the "labels" thing is so incredibly annoying. Please kill me now.
Any help is greatly appreciated.
@fberasategui- It is very hard to troubleshoot this without looking at the code. But, if the logs prove that the OData API is being correctly queried and the right resultset is being returned, there must be something wrong with the way that you are assembling the data in custom provider. I would suggest that you read through these and confirm that there are no obvious omissions/errors.
https://carinaclaesson.com/2020/02/27/virtual-entities-how-to-put-the-pieces-together/
@ben-thompson wrote:Well the question isn't really for github as chances are it's an issue within your code and not within the implementation of virtual entities.
Yeah, no. Sorry, this forum is completely unbearable. Terribly slow on each single click, and doesn't support markup. I understand this is intended for non-devs but for me this is completely unacceptable. Sorry, not sorry.
Also, there isn't any issue with my code, as stated above, performing the request on PostMan returns a properly formatted OData response, with correctly formated data:
{
"@odata.context": "https://myservice/$metadata#Clientes(CdsId,NroSocio,Nombre,Apellido)",
"value": [
{
"CdsId": "7696866e-58bd-484e-a526-0a9027cb56a4",
"NroSocio": "123",
"Apellido": "Doe",
"Nombre": "John"
},
{
"CdsId": "16cb67c2-9af4-4803-bb72-8e6a206e7197",
"NroSocio": "456",
"Apellido": "Perez",
"Nombre": "Juan"
}
]
}
Where CdsId is configured as the External Name for the entity's primary key.
Well the question isn't really for github as chances are it's an issue within your code and not within the implementation of virtual entities.
Reading through https://dynamicsninja.blog/2018/09/30/virtual-entities-part-1-odata-v4/ as a starting point on where your issue does your recordset have a set of guids to act as a unique identifier for each row?
WarrenBelz
85
Most Valuable Professional
Michael E. Gernaey
65
Super User 2025 Season 1
mmbr1606
55
Super User 2025 Season 1