rfcs
rfcs copied to clipboard
Update 0000-find-polymorphism.md
Add proposal for automatic hierarchy discovery
Hello,
I never understood why this wasn't either the default behavior or available through some other means.
If anything, I don't agree with your propose to have to add a { polymorphic: true }, I strongly believe this should be the default behavior.
Hopefully if this RFC is implemented we may finally have a non broken store in EmberJS !
Polymorphism for queries would be very useful!
Random thoughts:
- How about an adapter-level property
assumePolymorphism: true/false. That way, some people can go with the more verbosefind('my-query', { polymorphic: true })and others can have that as the default behaviour. - With Ember Engines, can one assume that all models are loaded? If all models aren't loaded, then one cannot reliably determine the model-hierarchy, so auto-discovery wouldn't work. Not sure if this would be a problem in practice or not, but could be worth keeping in mind.
@runspired is this something you want to pursue?
I don't think we need this anymore. Requests and the cache are now agnostic to type, and the identifiers RFC allows users to configure multiple types being considered as part of one identity.