Hi,
I'm trying to make a batch insert working in SQL Server but I see no way of accomplishing it..
I have a table in SQL Server like
Code:
TABLE [dbo].[SomeTable]( [tableId] [int] IDENTITY(1,1) NOT NULL, ...
CONSTRAINT [PK_SomeTable] PRIMARY KEY CLUSTERED([tableId] ASC)...
and Hibernate mapping like
Code:
<class name="SomeClass" table="SomeTable" schema="dbo" catalog="Something">
<id name="tableId" type="int">
<generator class="identity" />
</id>
....
According to the
batch insert tutorial Hibernate disables insert batching at the JDBC level transparently if you use an
identity identifier generator.
So, I was thinking about other generator type, but I can't use an
increment generator because I have a clustered key and it looks like I can't use an
assigned one because I have
IDENTITY(1,1) declared in SQL Server...
Could anybody give me some other options I can consider? Thanks a lot!