diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index f556257f9..eb6863859 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -1840,4 +1840,52 @@ class ClassMetadataInfo implements ClassMetadata { $this->isReadOnly = true; } + + /** + * A numerically indexed list of field names of this persistent class. + * + * This array includes identifier fields if present on this class. + * + * @return array + */ + public function getFieldNames() + { + return array_keys($this->fieldMappings); + } + + /** + * A numerically indexed list of association names of this persistent class. + * + * This array includes identifier associations if present on this class. + * + * @return array + */ + public function getAssociationNames() + { + return array_keys($this->associationMappings); + } + + /** + * Returns the target class name of the given association. + * + * @param string $assocName + * @return string + */ + public function getAssociationTargetClass($assocName) + { + if (!isset($this->associationMappings[$assocName])) { + throw new \InvalidArgumentException("Association name expected, '" . $assocName ."' is not an association."); + } + return $this->associationMappings[$assocName]['targetEntity']; + } + + /** + * Get fully-qualified class name of this persistent class. + * + * @return string + */ + public function getName() + { + return $this->name; + } } diff --git a/lib/vendor/doctrine-common b/lib/vendor/doctrine-common index ba63ae0f0..ea434bbea 160000 --- a/lib/vendor/doctrine-common +++ b/lib/vendor/doctrine-common @@ -1 +1 @@ -Subproject commit ba63ae0f0b6b62a2a8617f01386698730ff2b713 +Subproject commit ea434bbea37e067aa52272816c6dcda5ff826154