Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DoctrineBridge] Allow EntityValueResolver to return a list of entities #53365

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

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Jan 2, 2024

Q A
Branch? 7.1
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #53236 (sort of)
License MIT

Makes the following possible:

#[Route('/{author_id}', name: 'app_test')]
public function index(
    #[MapEntity(class: Post::class, expr: 'repository.findBy({"author": author_id}, {}, 10)')]
    iterable $posts
): Response {
// ...
}

This is actually something that used to be possible with the SensioFrameworkExtraBundle.

@HypeMC HypeMC force-pushed the mapentity-with-multiple-results branch from 11e1248 to 27ce294 Compare January 3, 2024 19:37
OskarStark referenced this pull request in symfony/symfony-docs Jan 20, 2024
@nicolas-grekas nicolas-grekas added the ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" label Apr 12, 2024
@HypeMC HypeMC force-pushed the mapentity-with-multiple-results branch from 27ce294 to 165524c Compare April 12, 2024 13:48
@nicolas-grekas
Copy link
Member

Thank you @HypeMC.

@nicolas-grekas nicolas-grekas merged commit 58705a1 into symfony:7.1 Apr 18, 2024
8 of 10 checks passed
@HypeMC HypeMC deleted the mapentity-with-multiple-results branch April 18, 2024 09:00
@fabpot fabpot mentioned this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DoctrineBridge Feature ❄️ Feature Freeze Important Pull Requests to finish before the next Symfony "feature freeze" Status: Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DoctrineBridge] MapEntity with multiple results
5 participants