ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • None
    • None
    • None
    • None
    • None
    • None

      A user has created Issue #595: Timestamps not hydrated on embedded models in laravel-mongodb. This Jira ticket was filed by kevinAlbs

      Issue Text:

      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 hydrated
      

      The result should have been the same regardless the way we saved the model (preferably, the timestamps should be there is both cases).

              Assignee:
              Unassigned
              Reporter:
              Kevin Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: