openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Can somebody tell me how to generate DDLs
Date Tue, 16 Dec 2008 20:31:55 GMT

$ java org.apache.openjpa.jdbc.meta.MappingTool -sql test.ddl -p

classpath should have
a) openjpa libraries
b) a directory X such that X/META-INF/persistence.xml exists

persistence.xml should declare the classes you want to generate DDL for in
<class> clause.
AFAIR, there were some issues with generating DDL without a database
connection. So specify a database configuration in persistence.xml also.

If you have many persistence unit defined in persistence.xml but want only a
specific persistence unit (say Y) to be processed then append it as follows
$ java org.apache.openjpa.jdbc.meta.MappingTool -sql test.ddl -p

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message