The HHH000487 error that a query attempts to update an immutable entity is being raised even if an immutable entity is not being raised changed but is being referenced in a subselect. In this case an update query is using a subselect to identify the entities that need to be changed. The subselect is used to select the ID's of referenced immutable entities but only the mutable entity is modified.
I have a test case pushed to github at https://github.com/barnabycourt/hibernate-immutable-subselect |
|