Monday, 1 February 2016

Loopback Filter using related Model Field

Imagine we have two tables, 'session' and 'movie' in PostgreSQL. The table 'session' has a foreign key to 'movie'. How can I define a relation in 'movie' so I can get movies with filters applied on 'session'. This table ('Session'), for example, has a column named 'created' and I want to get results that has sessions after today with a custom method in Movies.js.

Submitted February 01, 2016 at 05:29PM by XeroPT

No comments:

Post a Comment