Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYzZiNDM1OGM1...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-15683?atlOrigin=eyJpIjoiYzZiND...
) HHH-15683 (
https://hibernate.atlassian.net/browse/HHH-15683?atlOrigin=eyJpIjoiYzZiND...
) Query.setLockOptions() ignores some of the options, apparently by design (
https://hibernate.atlassian.net/browse/HHH-15683?atlOrigin=eyJpIjoiYzZiND...
)
Issue Type: Improvement Assignee: Unassigned Created: 07/Nov/2022 02:09 AM Priority: Major
Reporter: Gavin King (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
So look, frankly it smells a bit that LockOptions has aliasSpecificLockModes that only
apply to queries, and not to get() , refresh() or lock(). But now I see that when you call
Query.setLockOptions() , these aliasSpecificLockModes are actually ignored and not copied
over, making them almost useless. And this is actually the documented behavior , so I
can’t even call it a bug.
This is frankly a bit crazy, and either:
* Query.setLockOptions() should respect all the options in its argument, or
* We should remove aliasSpecificLockModes from LockOptions.
Both of those would be in principle a backward-incompatible change, but the first looks
pretty innocuous to me.
(
https://hibernate.atlassian.net/browse/HHH-15683#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15683#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#100210- sha1:4f8bc0d )