Esempio n. 1
0
 /**
  * Method called to associate a ChildIdentity object to this object
  * through the ChildIdentity foreign key attribute.
  *
  * @param  ChildIdentity $l ChildIdentity
  * @return $this|\Models\User The current object (for fluent API support)
  */
 public function addIdentity(ChildIdentity $l)
 {
     if ($this->collIdentities === null) {
         $this->initIdentities();
         $this->collIdentitiesPartial = true;
     }
     if (!$this->collIdentities->contains($l)) {
         $this->doAddIdentity($l);
         if ($this->identitiesScheduledForDeletion and $this->identitiesScheduledForDeletion->contains($l)) {
             $this->identitiesScheduledForDeletion->remove($this->identitiesScheduledForDeletion->search($l));
         }
     }
     return $this;
 }