openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
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
persistence.xml

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
persistence.xml#Y

-- 
View this message in context: http://n2.nabble.com/Can-somebody-tell-me-how-to-generate-DDLs-tp1662488p1664781.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message