I'm using angular2 on frontend, node/feathers on backend over Postgres (sequelize) db.
On backend I have events service on ".../events" route, and I'm trying to reach data from db, it works fine when I want to retrieve all events so I just make request on this route.. or when I want to retrieve just one event with certain id (make request on "../events/>>id<<). But how to get data by other attributes, for example I have user and its in association with event one to many, so how would I retrieve all events for one user (search by user id, not by events id). Or any other attribute, for example by name, return all events with certain name. How would that work, any code example?
In events model I have relation with user as one to many (event has creator) and I made that connection as events.belongsTo(user). How can I add that this same event has also many to many relation with users cause it has also attribute "participants" as users that are also included into this event, and every user can participate or own many events.