Example #1
0
 /**
  * Method called to associate a ChildBooks object to this object
  * through the ChildBooks foreign key attribute.
  *
  * @param  ChildBooks $l ChildBooks
  * @return $this|\Users The current object (for fluent API support)
  */
 public function addBooks(ChildBooks $l)
 {
     if ($this->collBookss === null) {
         $this->initBookss();
         $this->collBookssPartial = true;
     }
     if (!$this->collBookss->contains($l)) {
         $this->doAddBooks($l);
         if ($this->bookssScheduledForDeletion and $this->bookssScheduledForDeletion->contains($l)) {
             $this->bookssScheduledForDeletion->remove($this->bookssScheduledForDeletion->search($l));
         }
     }
     return $this;
 }