ddl generation without jpa [message #385264] |
Fri, 16 January 2009 09:10  |
Eclipse User |
|
|
|
hello,
im trying to generate DDL automatically within an old, pre-JPA-project,
but i cant get it work.
naivly i tried to set the jpa-properties from [1] at the login-objekt,
but it doesnt work. is there any chance to get it work without jpa and
where can i read how to do that?
<snip>
public class Project extends org.eclipse.persistence.sessions.Project {
//[...]
public void applyLogin() {
DatabaseLogin login = new DatabaseLogin();
//[...]
// Configuration Properties.
login.setProperty(PersistenceUnitProperties.DDL_GENERATION,
PersistenceUnitProperties.CREATE_ONLY);
login.setProperty(PersistenceUnitProperties.DDL_GENERATION_M ODE,
PersistenceUnitProperties.DDL_DATABASE_GENERATION);
//[...]
}
</snip>
[1]http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_ (ELUG)#Using_EclipseLink_JPA_Extensions_for_Schema_Generatio n
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04594 seconds