mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 17:33:15 +02:00
(hibernate / jpa) @Where - How to obtain a subset of a collection? #5253
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @marcos-rocha on GitHub (Sep 13, 2016).
Originally assigned to: @Ocramius on GitHub.
How can I obtain a subset of a larger collection?
What I want do to is filter a oneToMany using "clause x = y".
Example:
Please, visit the link:
http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/#entity-hibspec-collection
Thanks.
@Ocramius commented on GitHub (Sep 13, 2016):
Not supported by doctrine2: you will have to use the criteria API at runtime (see
PersistentCollection#matching())