Possibility to construct relations to other records with just their id(s)
Something like this:
You have a list of ids, and instead of fetching all records of them, you'll want to set a relation from a record to this list of ids.
Example (prototype syntax):
You have a list of ids, and instead of fetching all records of them, you'll want to set a relation from a record to this list of ids.
Example (prototype syntax):
$this->user->has_many('posts'); $record = $this->user->find(1); $list = array(1, 2, 3, 4, 5); // post ids of the records to relate to $record->add('posts', $list);
Leave a comment