protected function _resetrelationships($entity)
    {
        $entities = clone $entity->getRepository()->getSpace()->getEntities();

        //reset all the entities that have a belongs to or one to one relationship
        //with the $entity. Because since $entity is not being saved
        //nor should any child that requires the parent $entity value 
        foreach ($entities as $child) {
            if ($child->eql($entity)) {
                continue;
            }

            $relationships = $child->getEntityDescription()->getRelationships();

            foreach ($relationships as $relationship) {
                //child has a one to one or belongs to relationship to the entity (parent) 
                if ($relationship->isOneToOne() || $relationship->isManyToOne()) {
                    $value = $child->get($relationship->getName());

                    if ($entity->eql($value)) {
                        $child->reset();
                    }
                }
            }
        }
    }