Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] generating SQL at compile time

The schema is not generated by default; normally it is already defined on the
database.

To generate the schema a runtime the persistence.xml properties can be used:

They are all described in the
org.eclipse.persistence.config.PersistenceUnitProperties class.

"eclipselink.ddl-generation"="create-tables" or "drop-and-create-tables" or
"none"

"eclipselink.ddl-generation.output-mode"="sql-script" or "database"

"eclipselink.create-ddl-jdbc-file-name"
"eclipselink.drop-ddl-jdbc-file-name"


struberg wrote:
> 
> Hi!
> 
> My first question, so please be gentle if I ask an obvious question
> (though I've searched web & markmail) ;)
> 
> I'm currently evaluating eclipseLink and a few other JPA providers for
> replacing JDO in our production systems.
> 
> In many production setups, the apps simply don't have any grants for
> create/alter table statements. 
> 
> So, how can I generate the SQL statements for creating the database /
> upgrading the database without automatically performing those statements
> against the database?
> 
> Is there any class / ant task / maven plugin one can invoke to generate
> the SQL statements into a file?
> How can I disable the schema execution at runtime?
> 
> txs in advance,
> strub
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/generating-SQL-at-compile-time-tp20245495p20246532.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top