/**
* Get the metadata for an entity, including column information
*
* @param string|object $entity Entity or class name of the entity
* @return Entity
*/
public function getEntityMetadata($entity)
{
$class_name = Reader::getEntityClassName($entity);
if (!isset($this->metadata_cache[$class_name])) {
$parser = new AnnotationMetadataParser($class_name);
$this->metadata_cache[$class_name] = $parser->getEntityMetadata();
}
return $this->metadata_cache[$class_name];
}