Quantcast
Viewing all articles
Browse latest Browse all 4828

Loading data relative to a relation modify the relation[solved]

@bsylvain wrote:

EDIT : Sorry, the problem did not originate from ember.

In the same model hook I display a relation for a model, and I also want to display the data available to add as a relation :

const product = this.modelFor('products.edit');
const allLicences = this.get('store').findAll('licence');

The product has many licence, and I want to display the current licences, and a selector for possible licences to add. I understand that all data should be loaded from the route, but here it seems to replace the product.licences by all of the licences, unless I remove the line loading all of the licences, and then, product contain only the correct licences.

WHat am I missing?

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles