You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when mapping a type to Json, having an "int Id" will make it fail. How do I tell EF Core that Id is NOT a Key? Please add that to this page. Now it just shows how to tell EF Core WHAT is a Key. I tried renaming Id to like NotId and that works (but I need it to be called Id), I also tried [Keyless] but that gave me another error ...
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: d0a084df-15c4-ab25-26ca-83c8bdf6f026
Version Independent ID: f1fba5b2-eb2e-da0a-fce0-d492855c1777
I tried [Keyless] which I guess is the same but it still failed. I reached out to SO and got some help. The exceptions related to keys and ordinal keys in Json columns are really hard to decode. Please update the docs around this (or fix the Id column issue with Json columns).
BTW I think there's a bug in one of the Json column validation messages. The use of .First() to get a parameter for the message on an empty enumerator throws so you don't get the error message of the exception.
Hi,
when mapping a type to Json, having an "int Id" will make it fail. How do I tell EF Core that Id is NOT a Key? Please add that to this page. Now it just shows how to tell EF Core WHAT is a Key. I tried renaming Id to like NotId and that works (but I need it to be called Id), I also tried [Keyless] but that gave me another error ...
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: