Hi, I'm trying to extract schema information from an existing oracle database. Running "SchemaTool -reflect" does the job correctly for the tables in question, except it does not record the foreign keys or the tables in the generated schema file.
As http://ci.apache.org/projects/openjpa/trunk/docbook/manual.html#ref_guide_schema_info_factory might imply that the default DynamicSchemaFactory does not extract foreign key constraints from the database, I tried to enable the LazySchemaFactory with ForeignKeys set to true, but this does not change anything either. What am I doing wrong? Am I possible specifying the SchemaFactory property in the wrong place? My persistance.xml looks like this: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0"> <persistence-unit name="openjpa"> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider> <properties> <property name="openjpa.jdbc.DBDictionary" value="StoreCharsAsNumbers=false"/> <property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/> <property name="openjpa.ConnectionDriverName" value="oracle.jdbc.OracleDriver"/> <property name="openjpa.ConnectionURL" value="jdbc:oracle:thin:@host:1521:db"/> <property name="openjpa.ConnectionUserName" value="mydbschemaname"/> <property name="openjpa.ConnectionPassword" value="mydbpassword"/> </properties> </persistence-unit> </persistence> Thanks for your help. Regards Johannes -- ITC Consult GmbH 65189 Wiesbaden, Abraham-Lincoln-Str. 3, Tel. 0611 69 66 91 16, Mail: johannes.mar...@itc.deurag.de Geschäftsführer: Heinz Koenen, HRB 20821, Amtsgericht Wiesbaden, Ust-IdNr. DE 234638180 Ein Unternehmen der DEURAG Deutsche Rechtsschutzversicherung AG