protected function getMetadataFor($fqn)
{
$cache = new \Doctrine\Common\Cache\ArrayCache();
$reader = new \Doctrine\Common\Annotations\AnnotationReader($cache);
$annotationDriver = new \Doctrine\ODM\PHPCR\Mapping\Driver\AnnotationDriver($reader);
$annotationDriver->addPaths(array(__DIR__ . '/Model'));
$this->dm->getConfiguration()->setMetadataDriverImpl($annotationDriver);
$cmf = new ClassMetadataFactory($this->dm);
$meta = $cmf->getMetadataFor($fqn);
return $meta;
}