Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ddl generation without jpa
ddl generation without jpa [message #385264] Fri, 16 January 2009 14:10 Go to next message
Stefan Kriegbaum is currently offline Stefan KriegbaumFriend
Messages: 2
Registered: July 2009
Junior Member
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
Re: ddl generation without jpa [message #385287 is a reply to message #385264] Sun, 18 January 2009 01:35 Go to previous messageGo to next message
Doug Clarke is currently offline Doug ClarkeFriend
Messages: 155
Registered: July 2009
Senior Member
If you are using a native ORM project you can use the SchemaManager to
create the schema.

http://www.eclipse.org/eclipselink/api/latest/org/eclipse/pe rsistence/tools/schemaframework/SchemaManager.html

Doug
Re: ddl generation without jpa [message #385290 is a reply to message #385287] Mon, 19 January 2009 13:37 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Also see DefaultTableGenerator in the same package.

----
James


James : Wiki : Book : Blog : Twitter
Previous Topic:ReadAllQuery in 2-tier Swing App
Next Topic:Tree structure - avoid select on parent_id
Goto Forum:
  


Current Time: Sat Dec 20 18:49:02 GMT 2014

Powered by FUDForum. Page generated in 0.01675 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software