2

I am trying to configure translatable extension in my own project. The problem is that I have a whole bundle configured using yaml for mapping entities, so each entity have its own .orm.yml file. Now, I am trying to add the translatable extension but when I run the schema update command I get:

No identifier/primary key specified for Entity "Ruck\SportsBundle\Entity\Tr anslation\SportTranslation" sub class of "Sonata\TranslationBundle\Model\Ge dmo\AbstractPersonalTranslation". Every Entity must have an identifier/prim ary key.

In other bundle where I have used annotations it works fine... So my question is if translatable extension is incompatible with yaml files.

I have reading about this issue

https://github.com/Atlantic18/DoctrineExtensions/issues/671 https://github.com/Atlantic18/DoctrineExtensions/issues/989

but I think is too strange that I can't use yml files with translatable extension...

Thanks

Gerardo
  • 5,800
  • 11
  • 66
  • 94
  • not a direct anwer, but have you tried the Doctrine behavior extension https://github.com/KnpLabs/DoctrineBehaviors , it's done by the wonderful KnpLabs team and it has an extension for "Translatable" that we use in production here. – allan.simon Apr 12 '15 at 10:33
  • Have you read exception message? Does entity `Ruck\SportsBundle\Entity\Translation\SportTranslation` primary key? You can also show yaml mapping. – kba Apr 12 '15 at 10:46

0 Answers0