dustin10 / VichUploaderBundle

A simple Symfony bundle to ease file uploads with ORM entities and ODM documents.
MIT License
1.85k stars 519 forks source link

OneToMany directory namer #1265

Closed ikerib closed 2 years ago

ikerib commented 2 years ago

Hi, I have a Contract entity and a Files entity. Each contract will have multiple files so I have a OneToMany relation.

I'm trying to create a directory namer based on the parent entity (Contract) but when adding a new file to an entity, in the namer class al properties are empty. $contract = $object->getContract(); <= This happen to be null

Is there any way to solve this?

fico7489 commented 1 year ago

related https://github.com/dustin10/VichUploaderBundle/issues/1297