Closed
Description
Some ORM (like js-data) have two keys in object for defining a relation :
- a key with id or ids (unpopulated relation)
- a key with a populated relation
example for an article with a relation with a user :
{
"id": "1",
"title": "Nice article",
"user_id": "2", // unpopulated user
"user": { // populated user
"id": "2",
"name": "John Doe"
}
}
If we not explicitly populate relation in the ORM, we only have the user_id
key in object.
So, relationships configuration could have an alternative key to watch for unpopulated relationships if the populate relationship key does not exist.