I have a User
model that hasMany Reminders
.
When a User
is first created, I want the reminders
to be embedded. When it is updated, I don't want its reminders to be embedded. How can I do this?
My strategy was to create a custom new-user-serializer
that had DS.EmbeddedRecordsMixin
and
reminders: { embedded: 'always' }
and use that in my UserAdapter
s createRecord
method, but I couldn't get it working.
Aucun commentaire:
Enregistrer un commentaire