-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support IMutableNavigation.SetJsonPropertyName/IReadOnlyNavigation.GetJsonPropertyName - CosmosDB Provider #27328
Comments
Here is how a document looks like: {
"id": "Idf40a006c-f8e8-47e7-804f-3ca9bc890d91",
// scalar properties are named correctly.
"name": "Name1aa46385-77a1-4a16-ac6b-b4d07eefe02d",
"_etag": "\"00000000-0000-0000-1774-f210fcf501d8\"",
// navigation properties still have the default names
"Slot": {
"capacity": 10,
"Products": [
{
"productTypeId": "ProductTypeIdc571369b-89ba-443a-a7e2-686cbf5021c0",
"productVolume": 1
}
]
},
"_rid": "XjEOAJc-lqsGAAAAAAAAAA==",
"_self": "dbs/XjEOAA==/colls/XjEOAJc-lqs=/docs/XjEOAJc-lqsGAAAAAAAAAA==/",
"_attachments": "attachments/",
"_ts": 1643724405
} |
Try |
Hi @AndriySvyryd, thanks for your reply, that works as expected! Question: do you think it makes sense to align that part a bit so these extension methods exist for both I tried to implement that as my first contribution to efcore here: georgechond94@719ebf0 Let me know if that change is welcome, if yes, I will go on with creating some tests & a PR. |
I don't think it improves the experience that much. Hopefully #15258 will make it unnecessary to use the methods on IMutable* interfaces |
clear, thanks! |
I am setting the json property names for all the non-shadow properties in my model as such:
The above works well for scalar properties, although the same functionality is not there for navigation properties:
I tried setting the
CosmosAnnotationNames.PropertyName
annotation explicitly but it seems that it's being ignored for theIMutableNavigation
objects.Any reason why this is not supported?
Thanks!
The text was updated successfully, but these errors were encountered: