public function save($data)
 {
     $transaction = $this->beginTransaction();
     try {
         if ($this->isPersistent()) {
             $this->setActive(true);
         } else {
             $schema = new Construction($data->idConstruction);
             $entity = new Entity();
             $entity->setAlias($this->getEntry());
             $entity->setType('CE');
             $entity->save();
             $entry = new Entry();
             $entry->newEntry($this->getEntry());
             Base::createEntityRelation($entity->getId(), 'rel_elementof', $schema->getIdEntity());
             $this->setIdEntity($entity->getId());
             $this->setActive(true);
         }
         parent::save();
         $transaction->commit();
     } catch (\Exception $e) {
         $transaction->rollback();
         throw new \Exception($e->getMessage());
     }
 }