How to get generated keys without requerying the database?

2011-01-24 Thread robsinner
I have an Entity with a non primary key identity column. This entity Part.java has the following fields among others @EmbeddedId private PartPK pk; @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="REC_ID") private Integer recId; Note t

Re: Oracle batch insert

2011-01-24 Thread Fay Wang
You might want to add the following property to your persistence.xml to enable batch execution: Regards, Fay From: Vetal To: users@openjpa.apache.org Sent: Mon, January 24, 2011 4:38:25 AM Subject: Oracle batch insert It there effective way to persist

Oracle batch insert

2011-01-24 Thread Vetal
It there effective way to persist large number of new objects (approximately 2 objects) to Oracle database? Trying to persist in one transaction performs fine but slow (about 1 minute). Trying to do same using jdbc PreparedStatement and batch insert performs slightly faster