Hi,
I'm saving objects into Hibernate session, trying to use JDBC batch, but when I do it like that, I see in Hibernate debug logs that the actual batch size is 1 (although set to 50):
Code:
for (IEmployeeAudit audit : getEmployeeAudits()) {
IEmployeeTransaction EmployeeTransaction = audit.getEmployeeTransaction();
getHibernateTemplate().save(EmployeeTransaction);
getHibernateTemplate().save(audit);
}
when doing it like that, I see batches of size 50 for both classes:
Code:
for (IEmployeeAudit audit : getEmployeeAudits()) {
IEmployeeTransaction EmployeeTransaction = audit.getEmployeeTransaction();
getHibernateTemplate().save(EmployeeTransaction);
}
for (IEmployeeAudit audit : getEmployeeAudits()) {
getHibernateTemplate().save(audit);
}
Is that an expected behavior?
Thanks!