Lets say I have two entities Location and Holidays. Holidays are associated with a Location. Therefore, in breeze I can write a query like follows to retrieve the holidays related to a particular location:
return EntityQuery.from('GetLocationById')
.withParameters({ clientId: clientId, locationId : locationId })
.extend("Holidays")
.using(self.manager)
.execute()
.then(querySucceeded, this._queryFailed);
However, this data retrieval is permission based. I.e. there are two permissions for Locations and holidays. It could be that though the user has permission for locations, he may not have permissions for holidays. Is there anyway that I could still use the extend() method to retrieve the holidays, at the same time considering permissions? Or else, do I have to expose a separate method in the controller to retrieve holidays, after checking permissions?