doctrine - Entity alias in new symfony 2.7 directory structure -
after adapting new recommended structure in symfony 2.7 i'm not able access entity alias through $em->getrepository('bundle:entity').
this directory structure:
mybundle - component - catalog - model product.php and mapping definitition in config.yml:
mappings: mybundle: type: annotation dir: %kernel.root_dir%/../src/mybundle/component/product/model prefix: mybundle\component\product\model alias: ??? # tried different things what should write in $em->getrepository('mybundle:product') instead of mybundle:product succesfully accesing entity?
if possible use default symfony alias, don't need specify alias every entity in config.yml
actually didn't need generate:bundle it's not real bundle namespace , logical organization of files.
the solution specify complete namespace in getrespository():
$em->getrepository('mybundle\\component\\product\\model\\cfgproduct) thanks
Comments
Post a Comment