/**
  * @param  ChildFittingRuleEntity $fittingRuleEntityRelatedById The ChildFittingRuleEntity object to remove.
  * @return $this|ChildFittingRuleEntity The current object (for fluent API support)
  */
 public function removeFittingRuleEntityRelatedById(ChildFittingRuleEntity $fittingRuleEntityRelatedById)
 {
     if ($this->getFittingRuleEntitiesRelatedById()->contains($fittingRuleEntityRelatedById)) {
         $pos = $this->collFittingRuleEntitiesRelatedById->search($fittingRuleEntityRelatedById);
         $this->collFittingRuleEntitiesRelatedById->remove($pos);
         if (null === $this->fittingRuleEntitiesRelatedByIdScheduledForDeletion) {
             $this->fittingRuleEntitiesRelatedByIdScheduledForDeletion = clone $this->collFittingRuleEntitiesRelatedById;
             $this->fittingRuleEntitiesRelatedByIdScheduledForDeletion->clear();
         }
         $this->fittingRuleEntitiesRelatedByIdScheduledForDeletion[] = $fittingRuleEntityRelatedById;
         $fittingRuleEntityRelatedById->setFittingRuleEntityRelatedByForkedid(null);
     }
     return $this;
 }
 /**
  * @param  ChildFittingRuleEntity $fittingRuleEntity The ChildFittingRuleEntity object to remove.
  * @return $this|ChildUser The current object (for fluent API support)
  */
 public function removeFittingRuleEntity(ChildFittingRuleEntity $fittingRuleEntity)
 {
     if ($this->getFittingRuleEntities()->contains($fittingRuleEntity)) {
         $pos = $this->collFittingRuleEntities->search($fittingRuleEntity);
         $this->collFittingRuleEntities->remove($pos);
         if (null === $this->fittingRuleEntitiesScheduledForDeletion) {
             $this->fittingRuleEntitiesScheduledForDeletion = clone $this->collFittingRuleEntities;
             $this->fittingRuleEntitiesScheduledForDeletion->clear();
         }
         $this->fittingRuleEntitiesScheduledForDeletion[] = clone $fittingRuleEntity;
         $fittingRuleEntity->setUser(null);
     }
     return $this;
 }