Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update example with Embedded #1397

Merged
merged 1 commit into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ class Product

// ... other fields

// NOTE: This is not a mapped field of entity metadata, just a simple property.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the purpose of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your question is about the comment? if yes it's the same as in the doc without using the Embedded.

If it's about the PR globally it's to show mapping example for Embedded, for example fileNameProperty: 'image.name', size: 'image.size'

#[Vich\UploadableField(mapping: 'products', fileNameProperty: 'image.name', size: 'image.size')]
private ?File $imageFile = null;

#[ORM\Embedded(class: 'Vich\UploaderBundle\Entity\File')]
private ?EmbeddedFile $image = null;

Expand Down
Loading