You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an entity Person which inherits a Thing entity, based on schema.org pattern.
I also have a PersonTranslation which inherits a ThingTranslation entity.
ThingTranslation entity declares the description attribute.
Person entityTranslation declares the jobTitle attribute.
Then, on the PersonType form type, using ->add('translations', TranslationsType::class works fine.
The issue is when I want to describe both fields. I get the error Field(s) 'jobTitle' doesn't exist in App\Thing\Entity\ThingTranslation.
In A2lix\AutoFormBundle\Form\Manipulato\DoctrineORMManipulator@getDataClass, the association mapping fails to detect the PersonTranslation class.
Your solution works in the Basic case, but the a2lix allows you to change the Translation class name.
This method can be overridden in the Translatable Entity.
Hello,
I have an entity Person which inherits a Thing entity, based on schema.org pattern.
I also have a PersonTranslation which inherits a ThingTranslation entity.
ThingTranslation entity declares the
description
attribute.Person entityTranslation declares the
jobTitle
attribute.Then, on the PersonType form type, using
->add('translations', TranslationsType::class
works fine.The issue is when I want to describe both fields. I get the error
Field(s) 'jobTitle' doesn't exist in App\Thing\Entity\ThingTranslation
.In
A2lix\AutoFormBundle\Form\Manipulato\DoctrineORMManipulator@getDataClass
, the association mapping fails to detect the PersonTranslation class.If I basically replace
AutoFormBundle/src/Form/Manipulator/DoctrineORMManipulator.php
Line 88 in ff1c9f3
return $dataClass.'Translation';
, it works.Do you think it can have drawbacks ?
I may be related to #17
Thank you a lot.
The text was updated successfully, but these errors were encountered: