Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

insert many Entities via JPA - good Idea?

843859Jun 15 2010 — edited Nov 20 2014
(i didn't found a jpa/data tier subforum, if there is one move this please)

i am writing a db-application. One part is for interacting withe db (viewing, updating Entries) and another Part is for importing Data from different sources into DB (probably also exporting to xml,csv). Because i never used JPA i gave it a try and mapped the DB to entity classes. For manipulating and persisting single entities jpa seems to be a good choice. But what if i want to insert a great number of Instances? Each em.persist will cause one insert query, is this right? Is there a jpa way to bundle such batch inserts?
or is it better to write import/export classes that rely on jdbc? in my special case abaut 10k entries will be inserted at once.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2010
Added on Jun 15 2010
9 comments
405 views