[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-7151) Like the query-API, also NaturalIdLoadAccess should provide method setFlushMode(FlushMode mode)
Guenther Demetz (JIRA)
noreply at atlassian.com
Thu Mar 29 10:23:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-7151?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46090#comment-46090 ]
Guenther Demetz edited comment on HHH-7151 at 3/29/12 9:22 AM:
---------------------------------------------------------------
Please don't begin to work on this issue, there's a much better enhancement possible (=avoiding flush at all)
see HHH-7206
was (Author: pb00067):
Please don't begin to work on this issue, there's a much better enhancement possible (=avoiding flush at all)
I will open another improvement issue.
> 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