Home > Database > Mysql Tutorial > mysql-spring data jpa hibernate批量插入

mysql-spring data jpa hibernate批量插入

WBOY
Release: 2016-06-06 09:35:14
Original
2283 people have browsed it

mysqlspringhibernatejpa

原生的sql,在mysql中可以insert into table(column1,column2) values (), (),()这样批量插入很多数据,jpa中我看好像没有可以批量插入的。请问各位有吗?
看好多帖说EntityManager.persist(),然后多少条flush(), clear()。我看这种方式hibernate也是一条一条insert执行的,效率并不高。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template