jeudi 19 mai 2016

how to filter all those records(resource model) which dont have specific PROJECT

Basically i have PROJECT model and RESOURCE model. PROJECT have many RESOURCES and RESOURCE have many PROJECTS (many-to-many relationship). So i wants to peekAll or filter RESOURCES that are not belongs to my PROJECT. something like that:

this.store.filter('resource', function(resource){
resource.get('projects') != this.get('project')
}) 

it should be something like that. i dont know what would be correct way. i just wants to fetch those resources who dont have this.get('project') or specific project.




Aucun commentaire:

Enregistrer un commentaire