vendredi 9 juin 2017

how to get the derived relationship between two one-to-many relationships in a model in ember

I have a model called game which "belongs_to"i.e one-to-many relationship with sport model and also has "belongs_to" i.e one-to-many relationshio with a league model. Now how can i get the leagues for a particular sport using the relationship.

sport->(hasmany)->games

league ->(hasmany) --> games

how can i get the leagues for a particular sport




Aucun commentaire:

Enregistrer un commentaire