The following class has relation to ORO\Bundle\AttachmentBundle\Entity\File created with the AttachmentExtension in a migration.
class AssetFile {
protected $id;
protected $description;
}
Denormalizing data for an object of type ObjectA with ConfigurableEntityNormalizer fails, when it comes to denormalization of the Oro\Bundle\AttachmentBundle\Entity\File.
The following class has relation to ORO\Bundle\AttachmentBundle\Entity\File created with the AttachmentExtension in a migration.
Denormalizing data for an object of type ObjectA with ConfigurableEntityNormalizer fails, when it comes to denormalization of the Oro\Bundle\AttachmentBundle\Entity\File.
It is done with FileNormalizer in:
The
$context['entityName']
in this case will be ObjectA and validation will fail.The
$context['entityName']
should have value AssetFile.In the
denormalize
method ofConfigurableEntityNormalizer
at line 80 $context is being updated as follows:so
$context['entityName']
is not being updated before denormalizing next$value
$value
is instance ofSymfony\Component\HttpFoundation\File\File
$entityClass
=Oro\Bundles\AttachmentBundle\Entity\File