/**
  * Remove invTypes of this object
  * through the dgmtypeeffects cross reference table.
  * 
  * @param ChildInvTypes $invTypes
  * @return ChildDgmEffects The current object (for fluent API support)
  */
 public function removeInvTypes(ChildInvTypes $invTypes)
 {
     if ($this->getInvTypess()->contains($invTypes)) {
         $dgmTypeEffects = new ChildDgmTypeEffects();
         $dgmTypeEffects->setInvTypes($invTypes);
         if ($invTypes->isDgmEffectssLoaded()) {
             //remove the back reference if available
             $invTypes->getDgmEffectss()->removeObject($this);
         }
         $dgmTypeEffects->setDgmEffects($this);
         $this->removeDgmTypeEffects(clone $dgmTypeEffects);
         $dgmTypeEffects->clear();
         $this->collInvTypess->remove($this->collInvTypess->search($invTypes));
         if (null === $this->invTypessScheduledForDeletion) {
             $this->invTypessScheduledForDeletion = clone $this->collInvTypess;
             $this->invTypessScheduledForDeletion->clear();
         }
         $this->invTypessScheduledForDeletion->push($invTypes);
     }
     return $this;
 }
 /**
  * @param  ChildInvTypes $invTypes The ChildInvTypes object to remove.
  * @return $this|ChildInvGroups The current object (for fluent API support)
  */
 public function removeInvTypes(ChildInvTypes $invTypes)
 {
     if ($this->getInvTypess()->contains($invTypes)) {
         $pos = $this->collInvTypess->search($invTypes);
         $this->collInvTypess->remove($pos);
         if (null === $this->invTypessScheduledForDeletion) {
             $this->invTypessScheduledForDeletion = clone $this->collInvTypess;
             $this->invTypessScheduledForDeletion->clear();
         }
         $this->invTypessScheduledForDeletion[] = clone $invTypes;
         $invTypes->setInvGroups(null);
     }
     return $this;
 }