This is a bit complicated for me as it is not described at all in the documentation.
I have four models:
App.Dog = DS.Model.extend();
App.Cat = DS.Model.extend();
App.Food = DS.Model.extend();
App.Toy = DS.Model.extend();
Both dogand cathave lots foodand lots toys. On the other hand, it is one instance foodand toycan belong to only one dogor cat(so this is the relation hasMany-ish on the animal side and belongsTo-ish on the element side).
Any tips on how to do this in Ember using polymorphic relationships? Or maybe there is a better approach to achieve this other than polymorphic relationships?
Also, what code should be implemented in my controller to create a new record foodor toythat belongs to dogor cat?
Thank!