insert with @DynamicInsert should use generateIdentityInsertString()

see the comment in generateInsertString()
This commit is contained in:
Gavin King 2021-09-06 13:04:45 +02:00 committed by Andrea Boriero
parent 3ae6057311
commit d1806c5e92
1 changed files with 1 additions and 1 deletions

View File

@ -4035,7 +4035,7 @@ public abstract class AbstractEntityPersister
if ( entityMetamodel.isDynamicInsert() ) {
// For the case of dynamic-insert="true", we need to generate the INSERT SQL
boolean[] notNull = getPropertiesToInsert( fields );
id = insert( fields, notNull, generateInsertString( true, notNull ), object, session );
id = insert( fields, notNull, generateIdentityInsertString( notNull ), object, session );
for ( int j = 1; j < span; j++ ) {
insert( id, fields, notNull, j, generateInsertString( notNull, j ), object, session );
}