i have a problem with Node JS loop-back include filter when i make a query .Every time its giving all records in response.but i want only those records that holds the sportid which i am passing in query filter.
var request = {
method: 'get',
command: 'UserPersonalinfos',
query: {
filter: {
"include": {
"relation": "UserRegistration",
"where": {
"sportid": data[0].id
}
},
limit:5
}
},
headers: {
access_token:userAccessToken.id,
}
};
if sportid exists then it should return object otherwise it should not, but in this case its returns all UserPersonalinfos records and adding UserRegistration object to UserPersonalinfos object