Hibernate batch insert multiple rows on MySQL

Hibernate batch insert refers to making Hibernate insert multiple records with one query. Some databases support this kind of queries, and some do not. MySQL supports batch inserts, but in order to make Hibernate batch inserts work you need to configure it properly. A batch insert query looks like this: INSERT INTO table (col1, col2)...

Scroll to top