[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1497?page=c...
]
radhakrishna commented on HHH-1497:
-----------------------------------
We need to have an interceptor for stateless session especially when statelessSession is
so powerful during bulk insert/updates.
Allow interceptor for stateless session
---------------------------------------
Key: HHH-1497
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1497
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.1.2
Reporter: Stephen Friedrich
Priority: Minor
I need a way to adjust the sql that is executed in a stateless session.
Currently the constructor of StatelessSessionImpl() always uses an empty interceptor.
Is it possible to change that, so that there is an overloaded form of the constructor
that allows to pass an interceptor
(and overloaded methods in the session factory)?
Here's my use case:
I am doing mass inserts to a table using a stateless session.
DB is postgres with table partitioning for this table. Postgres implements partitioning
using inherited tables. There is no fully automated way to redirect data to the
appropriate table 'partition'. It is possible with postgres to define either rules
or triggers that insert data to the correct inherited table.
However that was way too slow for me (and besides there were problems with postgres
reporting back an inserted row count of zero which made hibernate complain).
I made the changes mentioned above to hibernate and it worked very well (almost ten times
faster).
See also
http://forum.hibernate.org/viewtopic.php?p=2292072
--
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