Type Microsoft.OData.Edm.EdmModel is not configured as a type that is allowed to be serialized for this instance of ObjectSerializer
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 505
- Forks
- 186
- PR merge metrics
- No merged PRs in 30d
Description
Version: 8.0.12
MongoDB.Driver: 2.19.2
MongoDB.Entities: 22.0.0
I am using MongoDB to create Odata service.
Here are my API and entity object
The issue currently while using
https://localhost:7119/odata/Supplier?select=Name
select for mongo db collection. It is throwing an error for mongo db. I am not sure is a mongo db package issue or if something needs to configure for OData.
BsonSerializationException: Type Microsoft.OData.Edm.EdmModel is not configured as a type that is allowed to be serialized for this instance of ObjectSerializer.
Can anyone guide here on what can be an issue here?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure at the /odata/Supplier?select=Name endpoint using the reported ASP.NET Core OData, MongoDB.Driver, and MongoDB.Entities versions. Trace how the OData $select request reaches MongoDB and the ObjectSerializer exception, then determine whether the failure is in package interaction or requires OData configuration; done means the endpoint works or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, mongodb
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100