[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2558) Allow batching inserts for multi-table entities

Steve Ebersole (JIRA) noreply at atlassian.com
Mon Jun 4 16:42:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27136 ] 

Steve Ebersole commented on HHH-2558:
-------------------------------------

You asked if a particular approach was viable.  I answered the manner in which it would be viable.  A look at the Hibernate code would tell you this is a naive approach in terms of Hibernate "magically" morphing the relation that way...

> Allow batching inserts for multi-table entities
> -----------------------------------------------
>
>                 Key: HHH-2558
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2558
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: core
>            Reporter: Steve Ebersole
>
> <joined-subclass/> as well as entity's containing <join/> mappings currently cannot participating in JDBC batching.  The reaons being that the actions (i.e. Executables) perform the insert or update in an atomic fashion through the persisters; the persisters perform the multiple statements.
> One possible approach for solving would be to have the persisters somehow expose the fact that inserts or updates effect multiple tables and to have the actions drive the executions of those statements.
> Another possible approach would be to change how Batcher works.  Currently, batcher is capable of tracking a single jdbc batch statement, which it does by string comparison of the sql.  So a new sql command is seen as the impetus to start a new batch.  So we could change this to make batch a logical concept  such that the "grouping" is actually at a higher level : like say "[command]:[entity-name](:[id])".  Then we could have batches keyed by "update:Customer:1" rather than "update CUSTOMER set ...".  Would need to be very careful in the case of dynamic-insert and dynamic-update...
> This is a follow-on  to HHH-1

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