-
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
Shared-type entities (part of property bag entities) #9914
Comments
Putting this on the backlog for now; we may pull it in if it is needed for some other 2.1 feature, such as if we allow seeding using navigations. |
This issue seems like slight duplication of #2282. I would like repeat myself saying this feature will be very helpful to implement F# type provider for EF Core. Please, consider bumping up priority. Thanks. |
@dmitry-a-morozov #2282 is about property bag properties, but this one is about property bag entities, which might or might not contain property bag properties |
@AndriySvyryd Thanks for clarification. I think I'm interested in this one then. I know statement about F# can be confusing. Let me know if you need more information on why it's helpful for F#. |
@dmitry-a-morozov I believe this would be useful in combination with F# type providers because when the design-time generated types are erased, property bags could act as the runtime type. Is this what you had in mind? @AndriySvyryd when I wrote the text about property bags in #2282 I was specifically talking about "property bag entities":
So I am still wondering what you mean when you say these are about two different things 😄 Anyway, I think it is fine to track property bag entities separately here because #2282 is a meta-issue. |
@divega Great ! I'm glad you're familiar with F# and we're on the same page. |
Also, consider working with |
@divega @dmitry-a-morozov Oops, I was thinking about #2968 |
@AndriySvyryd makes sense. Yep, #2968 is closely related too.
FWIW, I think it could be interesting to support arbitrary types that have an indexer of the right shape rather than requiring a specific type, i.e. pattern match the indexer, but not sure how much more complicated this would be. |
@divega @AndriySvyryd Any chance you can consider this for 2.1? |
@dmitry-a-morozov there is a possibility that we will do it in 2.1 or soon after, driven by other features like many-to-many without a join entity, but I wouldn't build plans around it just yet. |
@divega since 2.1 is winding down, is this something we could get on the docket for 2.2? |
#10731 is wishful thinking and has no practical value. Plan is simple: being able to create erasing F# type providers. Store specific of course. |
@weitzhandler How is this related to JSON support? |
Marking for re-triage, since we need to pull this into 5.0 and assign as appropriate. |
Pending items here
|
- Make FindEntityType(Type) return null for shared type entity type - Add IModel.IsShared(Type) API - Flow IEntityType info in places when availble rather than doing Type based loopup Part of #9914
- Make FindEntityType(Type) return null for shared type entity type - Add IModel.IsShared(Type) API - Flow IEntityType info in places when availble rather than doing Type based loopup Part of #9914
Design meeting decisions:
|
- Make FindEntityType(Type) return null for shared type entity type - Add IModel.IsShared(Type) API - Flow IEntityType info in places when availble rather than doing Type based loopup Part of #9914
There are entity types that don't have a natural mapping to a CLR type, either because they aren't part of the domain model (e.g. many-to-many join types) or because the CLR types are inaccessible (e.g. migration snapshot). While these could be mapped to shadow entity types #749 that would make working with them harder as they are tightly coupled to the state manager and would need special case handling throughout the stack, especially in the query pipeline.
Property bag entity types are still fully specified at model building time, dynamic types are tracked by #2282. The basic implementation would add support for entities backed up by a
Dictionary<string, object>
with a predefined entry that contains the entity type name.Usage:
Related to #2968
The text was updated successfully, but these errors were encountered: