Bulk insertion of CollectionTable elements in Hibernate / JPA
问题 We are using Hibernate 4.2 as the backing library for JPA 2.0 entities. We have an entity like the following: @Entity public class MyEntity { .... @ElementCollection @MapKeyColumn(name = "key") @Column(name = "value") @CollectionTable("MyEntityMap") private Map<String, Integer> theMap; ... } The map potentially has thousands of entries. I have set hibernate.jdbc.batch_size=50 , but Hibernate still generates an insert statement for each entry in the map, when I say entityManager.persist