openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Problem using OpenJPAEntityManager#createInstance
Date Thu, 13 Nov 2008 18:15:40 GMT

1. Ensure that the database you are using supports auto-assignment on insert
of new rows. If it does, then ensure that corresponding OpenJPA DBDictionary
property SupportsAutoAssign is set to true. 
  <property name="openjpa.jdbc.DBDictionary"
value="mysql(SupportsAutoAssign=true)"/>
  Please note that by default OpenJPA does not think that all database
supports auto-assignment and is only switched on for specific databases. 

2. A simpler solution is to switch to
    @GeneratedValue(strategy=GenerationType.AUTO)

3. The metadata registration and classloading done in your code for managed
interface *should* not be required if you specify the class name in <class>
clause of persistence.xml. But please report if that is not the case.

-- 
View this message in context: http://n2.nabble.com/Problem-using-OpenJPAEntityManager-createInstance-tp1493116p1494927.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message