Greetings, I know the problem is that there is no in my persistence XML.
<properties> <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" /> </properties> but I get problems here that in DB : Table User (number id, varchar name, number address_id). And the address_id can be null. Table Address(number id, varchar description) I map the User table into entity UserBean for example and set my addressId as null because I dont need it. if i delete in my persitence.xml the "xml fragment upstair (property fragment)", i will get error message <openjpa-1.1.0-r422266:659716 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: null at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.getConnection(AbstractJDBCSeq.java:162) at org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.nextInternal(NativeJDBCSeq.java:209) If I put in my persitence.xml the "xml fragment upstair (property fragment)", i will get error message <openjpa-1.1.0-r422266:659716 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Table "User" has a foreign key to table "Address" that has not been generated. You must run the schema generator on all inter-related tables at once. i just want to insert and delete into User table using UserEntity and set the addressId as null because later addressId can be taken from another class who deals with it. (I am working with already existing application and db). Any advice guys to deal with this situation ?? best regards sanga lawalata