-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Pass Request to EntityValueResolver
#18991
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
Pass Request to EntityValueResolver
#18991
Conversation
Request to EntityValueResolverRequest to EntityValueResolver
doctrine.rst
Outdated
| public function show( | ||
| Product $product, | ||
| #[MapEntity(expr: 'repository.findBy(["product_id" => id], null, request.query.get("limit", 10)')] | ||
| Comment $comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn'it be an array/collection ? due to the findBy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, thanks!
57f3cac to
665f51d
Compare
doctrine.rst
Outdated
| @@ -746,6 +746,23 @@ In the example above, the ``$product`` argument is handled automatically, | |||
| but ``$comment`` is configured with the attribute since they cannot both follow | |||
| the default convention. | |||
|
|
|||
| If you need to get other information from the request to fetch your entity, you | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick, but then this should be your entities, or at least your data ^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded to match any case 👌
665f51d to
8be44d7
Compare
|
Thank you Alexandre. |
Fix #18987