public function removeReference(ChildReference $reference)
    {
        if ($this->getReferences()->contains($reference)) { $skillReference = new ChildSkillReference();

            $skillReference->setReference($reference);
            if ($reference->isSkillsLoaded()) {
                //remove the back reference if available
                $reference->getSkills()->removeObject($this);
            }

            $skillReference->setSkill($this);
            $this->removeSkillReference(clone $skillReference);
            $skillReference->clear();

            $this->collReferences->remove($this->collReferences->search($reference));

            if (null === $this->referencesScheduledForDeletion) {
                $this->referencesScheduledForDeletion = clone $this->collReferences;
                $this->referencesScheduledForDeletion->clear();
            }

            $this->referencesScheduledForDeletion->push($reference);
        }


        return $this;
    }