Marco Belladelli (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=637b480...
) *commented* on HHH-16622 (
https://hibernate.atlassian.net/browse/HHH-16622?atlOrigin=eyJpIjoiZDA1NW...
)
Re: Criteria API - Already registered a copy (
https://hibernate.atlassian.net/browse/HHH-16622?atlOrigin=eyJpIjoiZDA1NW...
)
Hello, I’ve taken a look at your test case and I believe the problem is you’re trying to
reuse the same Predicate that contains a Subquery for two different CrieriaQueries. That’s
not something you can do, and with more complex queries you might get unexpected results
other than the copy error you’re getting.
The correct thing to do is create different Subquery}}s for each {{CriteriaQuery , in your
case it would be another one for the count query, and use that in the predicate list.
Let me know if there’s anything I can clarify for you further.
(
https://hibernate.atlassian.net/browse/HHH-16622#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16622#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:0428b75 )