These are chat archives for hibernate/hibernate-orm

Jan 2018
Steve Ebersole
Jan 31 14:40
@rahulg963 why not enable Hibernate's JDBC batching support?
Steve Ebersole
Jan 31 14:45
@jimmy1329 why do you want to? that's a perfectly valid SQL statement
@anindyaspaul You have to tell Hibernate it is generated - and note that this is a Hibernate-specific feature, not JPA
Wouter Lievens
Jan 31 15:41
Did something change in hibernate 5.2.11 -> 5.2.12 regarding how the orm.xml file is treated?
I use it to store named queries in a spring boot (spring-data jpa) app, and when upgrading spring-boot such that hibernate goes to 5.2.12, it suddenly can't find my named queries anymore
Steve Ebersole
Jan 31 16:11
@wlievens not intentionally
although be aware that often times Spring "gets in the way" in its attempts to help
for this reason we generally do not accept test cases using Spring
so that would be the first step
Jan 31 19:26

@sebersole I have tried hibernate batching too. But still in hibernate query logs multiple insert statements were being printed.
This is what I tried.
In file I added this.

And Session Clearing something like this.

public void processAllStudenst(List<Student> students, int size){
for( int i = 0; i < size; i++){; } session.flush(); session.clear(); updateInStudentIds(List<StudentIds>) }
Steve Ebersole
Jan 31 23:08
@rahulg963 Hibernate logs that every time it adds a new "row" to the batch
you should enable logging for batching if you want to see how batching is being handled
the logger you want is org.hibernate.engine.jdbc.batch