mercredi 9 août 2017

One query for multiple models

Because of optimization and external API Requirments, I have to handle a big and nested query into many models. Is that possible using Ember-data? The project is quite large, and I don't want to use something different cause of clarity of the code.

I'm interested in something like this:

get(this, 'store').query('models', params) 
// API result: 
//{  
//  toys: [...somethinData], 
//  food: [...somethinData], 
//  cars: [...somethinData] 
//}  

After the request, I'd like Ember to allocate data for each model. Any help will be highly appreciated.




Aucun commentaire:

Enregistrer un commentaire