Steve Ebersole commented on Improvement HHH-3795

With reattachment the only valid solution is to generally (re)obtain the loaded state. This might happen in a number of ways:

  • The enhancement option works if we have the entity track its state. This is already true in the new enhancement code I am working on. The next piece there would be to have that state become part of the entity's serialized state as well (currently I have all the enhanced additions set to be transient to not muck with the managed class's serial signature)
  • (re)load the loaded state. Part of that could be to peek into the second level cache as a first option, before physically querying the database. Personally, I'd like to see select-before-update control this; or maybe we default select-before-update to true for entities which contain one-to-one associations with orphan-removal enabled. But even then, currently select-before-update is too late in being applied to help here, so we'd then also need to add the ability for that loading to be triggered here.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira