/** * Finalizes this field and attach it to the ClassMetadata. * * Without this call a FieldBuilder has no effect on the ClassMetadata. * * @return ClassMetadataBuilder */ public function build() { $cm = $this->builder->getClassMetadata(); if ($this->generatedValue) { $cm->setIdGeneratorType(constant('Doctrine\\ORM\\Mapping\\ClassMetadata::GENERATOR_TYPE_' . $this->generatedValue)); } if ($this->version) { $cm->setVersionMapping($this->mapping); } $cm->mapField($this->mapping); if ($this->sequenceDef) { $cm->setSequenceGeneratorDefinition($this->sequenceDef); } return $this->builder; }
/** * Finalizes this embeddable and attach it to the ClassMetadata. * * Without this call an EmbeddedBuilder has no effect on the ClassMetadata. * * @return ClassMetadataBuilder */ public function build() { $cm = $this->builder->getClassMetadata(); $cm->mapEmbedded($this->mapping); return $this->builder; }