l3pp4rd/DoctrineExtensions — Issue #213: Class Gedmo\Translatable\Entity\Translation is not a valid entity or mapped super class.
Author: vazgen
Created: 2011-12-27 23:19:21+00:00
State: open

Hi,

I what to use Translation, so I have put annotations in my entity class. The part of persisting is working fine, I can see records on my "product" table as will as in table "ext_translations". But when I want to get Translation repository it throws an exception.

when I call "$repository = $em->getRepository('Gedmo\Translatable\Entity\Translation'); " it throes an exception "Class Gedmo\Translatable\Entity\Translation is not a valid entity or mapped super class."

/// config.yml

doctrine:
orm:
auto_generate_proxy_classes: %kernel.debug%
auto_mapping: true
mappings:
StofDoctrineExtensionsBundle: true

// product entity
id;
}

/**
* Set name
*
* @param string $name
*/
public function setName($name)
{
$this->name = $name;
}

/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}

public function setTranslatableLocale($locale)
{
$this->locale = $locale;
}
}

/// AppKernel.php

new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),

// autoload.php
'Stof' => __DIR__.'/../vendor/bundles',
'Gedmo' => __DIR__.'/../vendor/gedmo-doctrine-extensions/lib',

////////

thanks