You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if I instantiate a Person before the related Organization, the Organization model is never created. E.g.:
new Person({organization_id: 42}).get('organization') == null
I've tracked this down to the fact that findOrCreate returns null when an id is passed but the model does not (yet) exist in the store. I would expect it to create a sparse model (i.e. just an id), suitable for fetching.
I've tried modifying findOrCreate to add this behavior, but apparently lots of things expect the existing behavior (i.e. all the tests broke).
The text was updated successfully, but these errors were encountered:
I have an Organization model which has many Person models, where Person defines organization_id:
But if I instantiate a Person before the related Organization, the Organization model is never created. E.g.:
I've tracked this down to the fact that
findOrCreate
returnsnull
when an id is passed but the model does not (yet) exist in the store. I would expect it to create a sparse model (i.e. just an id), suitable forfetch
ing.I've tried modifying
findOrCreate
to add this behavior, but apparently lots of things expect the existing behavior (i.e. all the tests broke).The text was updated successfully, but these errors were encountered: