Q1. What is a bulk insert operation ? A1. My understanding of a bulk insert operation is that a single DML such as HQL or SQL will result in zero or multiple records inserted into a table. Q2. Does Hibernate 3.0.5 support bulk insert operation ? A2. Apparently not. Starting an HQL statement with INSERT is disallowed in Hibernate 3.0.5. Note you can start an HQL statement with UPDATE or DELETE, but not INSERT. In other words, bulk update and delete operations are supported, but not bulk insert in Hibernate 3.0.5. Q3. How can we perform bulk insert operations in Hibernate 3.0.5 ? A3. Hibernate allows parameterized native SQL Query to be specified in the Hibernate mapping file via the XML element. So one obvious idea is to specify a native SQL Query with an INSERT statement. However, I couldn't get this to work without patching 2 classes in Hibernate 3.0.5. Pre-requisite: Patch 2 classes in the hibernate3.jar: org.hibernate.loader.custom.CustomLoader.java org.hibernate.loader.Loader.java The hibernate3.0.5-patched.jar is a convenient Hibernate 3.0.5 jar patched with the two classes. The two patched java source files are available under the src directory. Example: insert into A (a1, a2, a3) select b1, b2, :p1 from b where b3 = :p2 Note: 1) The return-scalar is necessary to keep Hibernate 3.0.5 happy, so it won't reject the insert statement. 2) The column="null" is a special notation recognized by the patched classes to simply execute the native SQL without bothering with the return value. Code Sample: (Assume we use Spring.) String[] paramNames = {"p1", "p2"}; Object[] paramValues = {"p1value", "p2value"}; // Execute the native SQL Query purely for it's side effect getHibernateTemplate().findByNamedQueryAndNamedParam("bulkInsertQuery1", paramNames, paramValues); That's all. It's a hack but it works! Enjoy. Hopefully the Hibernate team will provide proper support for HQL bulk insert operation in the near future. Joe D. Velopar 30 Aug 2005