Skip to content

About UploadableField in a Doctrine Embeddable class #866

Open
@welcoMattic

Description

@welcoMattic
Q A
Bug report? yes
Feature request? yes
BC Break report? no
Symfony version 4.0.8
VichUploaderBundle version 1.8.2

Hi, thanks for your work on this bundle! It's really useful.

However, I just handle a non-usual case with @Vich\UploadableField inside a @ORM\Embeddable() class. This class is embedded in some of other classic Entities in my application. Everything, for display, works. But, when I try to edit file (image in my case) in EasyAdmin (1.17.12), properly configured, none of my @Vich\UploadableField properties are updated.

I've debug the bundle, to find why Embeddable properties flagged as UploadableField were not listed as uploadableField in the MetadataReader. The only thing I've found is that this reader cannot understand the Embeddable behaviour, because it's not a Doctrine Metadata Reader. Is there any way to mix JMS\MetadataReader and Doctrine\ClassMetadata to fix this bug, and add support for Embeddable UploadableField properties?

Thanks a lot!

EDIT: may be this bug fix on symfony/maker-bundle can help us to fix the bug: https://github.com/symfony/maker-bundle/pull/164/files#diff-1eecb8f832b5aae76ee86af10e507715

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions