Skip to content
Advertisement

WebfactoryPolyglotBundle use causes error “No mapping found for field ‘id’ on class ‘AppBundleEntityFilm’.”

I use the Symfony version 3.4.0 and I try to use this bundle to translate entities : https://github.com/webfactory/WebfactoryPolyglotBundle

So I created two entities ( Film and FilmTranslation ) for the test

Here my Film.php

JavaScript

And here my FilmTranslation.php

JavaScript

I’m able to create a form but when I try to persist and flush I’ve the following error :

No mapping found for field ‘id’ on class ‘AppBundleEntityFilm’.

Is something I’m doing wrong ?

Advertisement

Answer

So remove @PolyglotTranslationCollection from $id annotation like this 😉

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement