generating SQL at compile time

View: New views
2 Messages — Rating Filter:   Alert me  

generating SQL at compile time

by struberg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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






_______________________________________________
eclipselink-users mailing list
eclipselink-users@...
https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Re: generating SQL at compile time

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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