Please help me My issue describe as follow 1) User Entity
var User = Waterline.Collection.extend({
identity: 'user',
connection: 'local-postgresql',
attributes: {
firstName: 'string',
lastName: 'string',
// Add a reference to Pet
pet: {
model: 'pet'
}
}
});
2) Pet Entity
var Pet = Waterline.Collection.extend({
identity: 'pet',
connection: 'local-postgresql',
attributes: {
breed: 'string',
type: 'string',
name: 'string',
// Add a reference to User
user: {
model: 'user'
}
}
});
These entities are associated with each other. Now I want to find User entity using attribute of pet (i.e name). How should be query for this situation ? or any other way to join these tables?