[EF-91] What is wrong with this model Created: 17/Jan/24 Updated: 24/Jan/24 |
|
| Status: | Waiting for Reporter |
| Project: | Entity Framework |
| Component/s: | None |
| Affects Version/s: | Public Preview 1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Юрий Романов | Assignee: | Damien Guard |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Hello, i'm using EF in my F#\C# project. The model is simple:
i've saved my data and MongoDB Compass shows this:
if i try just to find record:
but if i remove data: EditorData from EditorBlock everything works
thank you for any help |
| Comments |
| Comment by Damien Guard [ 24/Jan/24 ] |
|
The reason I asked about the Bson attributes is we are considering adding a Convention provider for our EF driver that would detect them and apply the equivalent EF metadata as necessary but we're trying to get some data points about expectations. I'll mark the issue as a duplicate at this end which will close it. |
| Comment by Юрий Романов [ 24/Jan/24 ] |
|
damien.guard@mongodb.com hello, thanks for the feedback. Do i need to close the issue? I always use my keys and generate them manually in any database provider, strange but everything works with BsonId and BsonRepresentation ... or maybe EF just handles my generation well. |
| Comment by Damien Guard [ 23/Jan/24 ] |
|
Hello. Unfortunately objects (documents) with more than one level of nesting do not work in preview release 1. This is what the error message is from. The fix for this has gone into the main branch but it will be some time before we ship another update with the fix in it. Additionally BsonId and BsonRepresentation etc. are not recognized by the EF metadata system. Out of curiosity did you try to use them because the documentation made you think they would be honored by the MongoDB EF Core Provider or did you have familiarity with the existing MongoDB C# Driver and decided to try them out? Thanks Damien |
| Comment by Юрий Романов [ 18/Jan/24 ] |
|
works with [BsonIgnoreExtraElements] and classic MongoDB.Driver.Core but fails anyway with EF |