-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
discussionDiscuss about a particular subject to take a decisionDiscuss about a particular subject to take a decisionenhancementNew feature or requestNew feature or request
Description
Today, these 2 classes have the same dehydrate method, which returns the document without the Associations attributes, and hydrates the document's relationships attribute with the relationships defined in the app's schema.
The default is that even if there are no relationships, the document has X(number of relationships defined in the app schema) objects added to its relationships attribute, and is registered in the DB as such.
It would probably be wiser not to add relationships that have no data?
This was highlighted during a development on cozy-contacts, where we needed to dehydrate the document.
https://github.com/cozy/cozy-contacts/blob/131c50c17c66171ba6e7c0cc3997b88abac259b1/src/components/ContactCard/ContactForm/helpers.js#L174-L191
Metadata
Metadata
Assignees
Labels
discussionDiscuss about a particular subject to take a decisionDiscuss about a particular subject to take a decisionenhancementNew feature or requestNew feature or request