[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5797?page=c...
]
Steve Ebersole commented on HHH-5797:
-------------------------------------
I have a preliminary idea about using an interface {{Operation}} to help here. The idea
would be that a {{Batch}} is composed of a series of {{Operation}}s instead of a series of
{{PreparedStatement}}s as it is today.
The underlying trouble here is the possibility that existing rows in the secondary tables
may not exist (legacy data). Therefore instead of an {{UPDATE}}, for example, in the
secondary table we may instead need to issue an {{INSERT}}. However, we do not know that
until after the {{UPDATE}} has been attempted. It is this situation of "multiple
statements" that is being addressed here.
Improve batching for entity updates or deletes that use secondary
tables
------------------------------------------------------------------------
Key: HHH-5797
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5797
Project: Hibernate Core
Issue Type: Improvement
Components: core
Reporter: Gail Badner
Fix For: 4.x
Currently, batching is only used for update/delete statements made to an entity's
primary table (subject to other conditions). Batching is not used for update/delete
statements on secondary tables.
1) if an entity has *any* secondary tables with optional="true, do not use batching
for updating/deleting any of the entity's (primary or secondary) tables
2) if all of an entity's secondary tables are non-optional (e.g. "joined"
subclass, all "joined" tables have optional="false"), then use
batching for updates/deletes to all (primary and secondary) tables
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira