HasMany and referencesMany return empty array

40 views
Skip to first unread message

Paolo Sinelli

unread,
Oct 5, 2015, 10:33:09 AM10/5/15
to LoopbackJS
I have a Match-Player relationship.
Each Match has a referencesMany relation (a match has many players), while the Player has a hasMany one (each player has many matches).
I create the match record passing an array of playerIds, and it is correctly saved to the database.
But when I use the endpoint

/players/{id}/matches

passing the player id, the returning array is always empty.
What am I doing wrong?
Reply all
Reply to author
Forward
0 new messages