[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2816) DefaultFlushEntityEventListener.checkNaturalId() causes extra SELECTs on read-only entities
Chris Bredesen (JIRA)
noreply at atlassian.com
Wed Sep 5 17:44:14 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28020 ]
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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list