No matter what, I can't batch MySQL INSERT statements in Hibernate
I'm currently facing the well-known and common Hibernate insert batch problem. I need to save batches 5 millions of rows long. I'm first trying with a much lighter payload. Since I have to insert entities of only 2 types (first all records of type A, then all records of type B, all pointing to common type C ManyToOne parent), I would like to take the most advantage from JDBC batch insert. I have already read lots of documentation, but none that I have tried worked. I know that in order to use batch inserts I must not use an entity generator. So I removed the AUTO_INCREMENT ID and I'm setting