-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
relationsRelations between documentsRelations between documents
Description
<?php
class Model extends \Jenssegers\Mongodb\Model
{
public function association()
{
return $this->embedsMany('ModelChild');
}
}
class ModelChild extends \Jenssegers\Mongodb\Model
{
}
$model = new Model;
$child = new ChildModel;
$model->association()->associate($child);
$model->save(); // The child's timestamps ARE NOT hydrated
$model = new Model;
$child = new ChildModel;
$model->save();
$model->association()->save($child); // The child's timestamps ARE hydratedThe result should have been the same regardless the way we saved the model (preferably, the timestamps should be there is both cases).
Metadata
Metadata
Assignees
Labels
relationsRelations between documentsRelations between documents