insert with @DynamicInsert should use generateIdentityInsertString()
see the comment in generateInsertString()
This commit is contained in:
parent
3ae6057311
commit
d1806c5e92
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue