]
Chris Bredesen commented on HHH-2816:
-------------------------------------
This happens when the entity (with natural-id) is read (read-only) and subsequently used
in a many-to-one association. The fix seems to be simply skipping the checkNaturalId()
call when the entity is read-only.
DefaultFlushEntityEventListener.checkNaturalId() causes extra SELECTs
on read-only entities
-------------------------------------------------------------------------------------------
Key: HHH-2816
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2816
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.3, 3.2.4, 3.2.4.sp1, 3.2.5
Reporter: Chris Bredesen
Assignee: Chris Bredesen
Entities loaded by a read-only query are correctly loaded and no snapshot is stored.
However, the call to checkNaturalId() causes the state to be re-read from the database
unnecessarily.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: