[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-7151) Like the query-API, also NaturalIdLoadAccess should provide method setFlushMode(FlushMode mode)
Guenther Demetz (JIRA)
noreply at atlassian.com
Thu May 3 03:03:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46486#comment-46486 ]
Guenther Demetz commented on HHH-7151:
--------------------------------------
This issue can be closed or rejected, since HHH-7206 was implemented.
> Like the query-API, also NaturalIdLoadAccess should provide method setFlushMode(FlushMode mode)
> -----------------------------------------------------------------------------------------------
>
> Key: HHH-7151
> URL: https://hibernate.onjira.com/browse/HHH-7151
> Project: Hibernate ORM
> Issue Type: Improvement
> Components: core
> Affects Versions: 4.1.1
> Environment: -
> Reporter: Guenther Demetz
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Implicit flushes in my opinion always should be, as widest as possible, under users control, this because
> unneccessary flushings often create serious implications, especially when working with long-time transactions.
> On long-time transactions the time-window between flush and final commit become big enough
> to cause lock-waits or/and lock-timeouts on concurrent transactions.
> With bugfix HHH-7094 the NaturalIdLoadAccess becomes pratically ununseable for our projects.
> Like on all Hibernate Query-Apis, the user should have the possibility to choose between variuos FlushModes.
> Example:
> (Simple)NaturalIdLoadAccess naturalIdAccess = session.by(Simple)NaturalId(MyEntity.class);
> naturalIdAccess.setFlushMode(FlushMode.AUTO); // flush if required
> naturalIdAccess.setFlushMode(FlushMode.COMMIT); // don't flush until commit time
> Object obj = naturalIdAccess.load(id);
> N.B.: I enabled the 'Requires Release Note' check-box, because this enhancement implies a behaviour change.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list