rfcs icon indicating copy to clipboard operation
rfcs copied to clipboard

Update 0000-find-polymorphism.md

Open BryanCrotaz opened this issue 8 years ago • 3 comments
trafficstars

Add proposal for automatic hierarchy discovery

BryanCrotaz avatar Aug 16 '17 10:08 BryanCrotaz

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 !

xaqq avatar Aug 16 '17 12:08 xaqq

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 verbose find('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.

sandstrom avatar Aug 24 '17 07:08 sandstrom

@runspired is this something you want to pursue?

wagenet avatar Jul 23 '22 17:07 wagenet

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.

runspired avatar Mar 27 '23 05:03 runspired