Batch inserts with JPA/EJB3

后端 未结 5 511
说谎
说谎 2020-12-01 10:45

Does JPA/EJB3 framework provide standard way to do batch insert operation...? We use hibernate for persistence framework, So I can fall back to Hibernate Session and use com

5条回答
  •  无人及你
    2020-12-01 11:41

    Yes you can rollback to your JPA implementation if you wish in order to have the control you defined.

    JPA 1.0 is rich on EL-HQL but light on Criteria API support, however this has been addressed in 2.0.

    Session session = (Session) entityManager.getDelegate();
    session.setFlushMode(FlushMode.MANUAL);
    

提交回复
热议问题