whereJoinFragment += " and ";
}
}
select.setWhereClause( whereJoinFragment + whereClause.getUserWhereClauseFragment() );
InsertSelect insert = new InsertSelect( sessionFactory.getDialect() );
if ( sessionFactory.getSettings().isCommentsEnabled() ) {
insert.setComment( "insert-select for " + persister.getEntityName() + " ids" );
}
insert.setTableName( determineIdTableName( persister ) );
insert.setSelect( select );
return insert.toStatementString();
}