|
From: Keith D. <kd...@cs...> - 2004-11-28 03:20:22
|
Was thinking the following would be useful additions to our hibernate support: 1. The ability to export schema definitions to a file. Currently to do this, I am forced to use Hibernate's Schema Export directly with a Spring configured SessionFactory. This involves a hack of implementing a custom DataSourceConnectionProvider that works post LocalSessionFactoryBean initialization. 2. Support for setFlushMode(FlushMode.COMMIT) in Hibernate template. Doing this now requires issuing a callback. 3. Support for 2.16 scrollable result sets (perhaps abstracted away by an iterator interface), and notably processing large batches of scrollable result sets in a 'best practice' fashion discussed here: http://blog.hibernate.org/cgi-bin/blosxom.cgi/2004/08/ Something like: Iterator it = hibernateTemplate.iterator("from Entity", 20); while (it.hasNext()) { Entity entity = (Entity)it.next(); } . where 20 is a batchSize that, when reached, should trigger a session.flush() and session.clear() (all encapsulated by the template) Keith |