-
Hi, ... $image = new File('tmp/test.png'); // file exists $user->setAvatar($image); $this->em->flush(); I have configured entity with instructions from the article: https://rekalogika.dev/file-bundle/doctrine-entity Does this bundle work? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
You are probably casting the If you still have a problem, please provide a stack trace. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response. I know what this error says but I work carefully with the documentation: https://rekalogika.dev/file-bundle/doctrine-entity This is my entity: ` #[WithFileAssociation] ...
... Stack trace: at vendor/doctrine/dbal/src/Driver/PDO/Statement.php:48 |
Beta Was this translation helpful? Give feedback.
-
That shouldn't happen. The file property should not get a field on the database. Make sure |
Beta Was this translation helpful? Give feedback.
-
Ok, all is clear. The bundle make more magic that i was thinked. Thanks :) |
Beta Was this translation helpful? Give feedback.
@szal1k
That shouldn't happen. The file property should not get a field on the database. Make sure
AsFileAssociation
is the only attribute attached to$avatar
.