-
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
2.1.0 can't do Value Conversions on complex IEnumerable types like JObject (newtonsoft) #12203
Comments
See also #12229 |
Depending on the complexity and risk of the fix, we may consider this for a patch release since converting JObject seems like it will be a common request. Putting in 2.1.3 at least until we have the PR. /cc @AndriySvyryd |
@NinoFloris As a workaround you can put a |
Thanks for the quick responses! @AndriySvyryd So NotMapped is specifically not applicable for ValueConversions? Sounds like a thing to have in the docs as I would intuitively think NotMapped == never touched by EF. EDIT: |
@NinoFloris Yes, the NotMapped is just a workaround that relies on the principal that fluent API overrides data annotations. So the property is mapped ultimately, but NotMapped stops it from being treated as an entity type in discovery before the mapping happens. |
This is approved for 2.1.3. Do not merge yet; branch is expected to open Monday. Given these issues have been parked for some time, please be careful to ensure the correct commits get into the correct branches. |
@AndriySvyryd This issue is approved for patch and the release\2.1 branch is now open for merging. Please ensure:
|
It seems any complex property type still goes through all the discover relationships machinery even though you explicitly call the new 2.1 value converter api
HasConversion(converter)
.For example try to set up a value conversion for Newtonsofts
JObject
as this one implements many IEnumerable derived interfaces that will trigger thisDiscoverRelationships
codepath.Leading to beautifully vague stacktraces and completely blocking us from using this new api
The text was updated successfully, but these errors were encountered: