I am using a polymorphic relationship for models and when adding models to the store, I am getting this error:
Error while processing route: alerts.index Assertion Failed: You can only add a 'alert' record to this relationship Error: Assertion Failed: You can only add a 'alert' record to this relationship
In this case, I have many types of alerts (e.g. over a value, under a value)
I only get this error if I turn Ember.MODEL_FACTORY_INJECTIONS = TRUE
I've tracked the bug down to the addCanonicalRecord
method being used instead of the addRecord
method.
You can view the code here: http://ift.tt/1A2rMjg
Can anyone tell me what the difference is between the two and how I can call the regulard addRecord
method?
Aucun commentaire:
Enregistrer un commentaire