[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-1588) delay inserts for insert-generated-identifiers outside transaction

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Mar 21 13:01:14 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-1588.
-------------------------------


Closing stale resolved issues

> delay inserts for insert-generated-identifiers outside transaction
> ------------------------------------------------------------------
>
>                 Key: HHH-1588
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1588
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.2.0 cr1
>
>
> Currently, when an entity with some form of PostInsertIdentifierGenerator key generator (IDENTITY, select) is saved or persisted the insert happens immediately.  This is done in order to know the generated id value because the legacy save() method requires it for a return value (plus proper hashing etc within the PersistenceContext).  
> For EJB3, the persist() method does not dictate the generated id value to be returned and allows the provider to schedule the id-generation and insertion at a later point in time.  However, it also requires that when an entity is persist()ed either directly or through cascade outside of a transaction, that the insert needs to be delayed until:
> (1) we join a transaction and a normal flush executes the pending actions
> (2) an explicit flush occurs

-- 
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