Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Problem with Generate DDL
Problem with Generate DDL [message #434505] Fri, 29 June 2007 11:43 Go to next message
Eclipse User
Originally posted by: edebienne.gmail.com

Hi,

I want to generate DDL from an entity in order to build my database schema.

After writing my entity, I made JPATools -> Generate DDL and I got the
error : DDL generation is not supported by the Generic Platform.

So my question is How to get a Platform that will able to generate DDL and
how to configure Eclipse to use it.

For your information, I use eclipse 3.3 + WTP 2.0, jboss 5.0 beta 2 and
mysql 5.

regards

Eric
Re: Problem with Generate DDL [message #434509 is a reply to message #434505] Fri, 29 June 2007 16:57 Go to previous messageGo to next message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
Eric Debienne wrote:

> So my question is How to get a Platform that will able to generate DDL and
> how to configure Eclipse to use it.

Hi Eric,

Last year sometime a decision was made, after community consultation,
to discontinue work on DDL generation because all of the JPA runtimes that
we were aware of include DDL generation. It was deemed a better use of
time to provide a way to delegate this functionality to a runtime instead
of building it into Dali.

So Dali 1.0's generic platform doesn't have any support for DDL
generation and it's expected that vendors or community members will either
contribute runtime platforms or make them available. Oracle has one in
development for Oracle TopLink 11g and TopLink Essentials. SAP hasn't
announced anything but has been discussing DDL generation on the dali-dev
mailing list so I strongly suspect they'll provide one for their runtime
also. Can anyone from SAP comment?

In the meantime, if you're using either Oracle TopLink 11g or TopLink
Essentials, invoking DDL generation is pretty easy. The Dali tutorial [1]
uses DDL generation to avoid having to ship SQL scripts for the demo
database. Open up the populatedb.jar and you'll find
PopulateDatabase.java and JPACommandLine.java. All it takes to get both
Oracle TopLink 11 or TopLink Essentials to generate DDL is to add a
property to the Map passed to the EntityManagerFactory and create an
EntityManager. The property and value are:

"toplink.ddl-generation", "drop-and-create-tables"

You can tweak a few more generation options [2] but that's the core of it.


Hope this helps,

--Shaun

[1]
http://www.eclipse.org/webtools/dali/docs/tutorial_1.0/dali_ jsf_tutorial.htm
[2]
http://www.oracle.com/technology/products/ias/toplink/jpa/re sources/toplink-jpa-extensions.html#CACIJBBA
Re: Problem with Generate DDL [message #434522 is a reply to message #434509] Thu, 19 July 2007 13:32 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost Kraaijeveld
Messages: 173
Registered: July 2009
Senior Member
Hi Shaun,

Shaun Smith wrote:
> Eric Debienne wrote:
>
>> So my question is How to get a Platform that will able to generate DDL
>> and how to configure Eclipse to use it.
>
> Hi Eric,
>
> Last year sometime a decision was made, after community consultation,
> to discontinue work on DDL generation because all of the JPA runtimes
> that we were aware of include DDL generation. It was deemed a better
> use of time to provide a way to delegate this functionality to a runtime
> instead of building it into Dali.
> So Dali 1.0's generic platform doesn't have any support for DDL
> generation and it's expected that vendors or community members will
> either contribute runtime platforms or make them available.

Does this answer mean that I can "only" use Dali to generate entities
from existing tables and that I cannot generate the to create tables
from existing entities if I use the generic platform ( I can re-engineer
entities but cannot forward-engineer databases)?

If I use JBoss 4.2 and PostgreSQL 8.2, is there a way to
"forward-engineer" a database somehow?



TIA

Joost
Re: Problem with Generate DDL [message #434528 is a reply to message #434522] Mon, 23 July 2007 11:57 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
That's correct. You can only generate entities when using the generic
platform provided by Dali. The concept is that JPA vendors will implement
their own platforms to provide DDL generation from existing entities in
Dali. I don't believe there are any publicly available platforms at the
moment for JBoss, but eventually there will be one.

JBoss runtime has the ability to forward-engineer the database, but for
the moment you would need to use the API's or command line to achieve
this, or use a specific JBoss tool.

The hope is that some day soon this functionality will be integrated with
Dali.

Neil


Joost Kraaijeveld wrote:
> Does this answer mean that I can "only" use Dali to generate entities
> from existing tables and that I cannot generate the to create tables
> from existing entities if I use the generic platform ( I can re-engineer
> entities but cannot forward-engineer databases)?

> If I use JBoss 4.2 and PostgreSQL 8.2, is there a way to
> "forward-engineer" a database somehow?



> TIA

> Joost
Re: Problem with Generate DDL [message #602400 is a reply to message #434505] Fri, 29 June 2007 16:57 Go to previous message
Shaun Smith is currently offline Shaun Smith
Messages: 197
Registered: July 2009
Senior Member
Eric Debienne wrote:

> So my question is How to get a Platform that will able to generate DDL and
> how to configure Eclipse to use it.

Hi Eric,

Last year sometime a decision was made, after community consultation,
to discontinue work on DDL generation because all of the JPA runtimes that
we were aware of include DDL generation. It was deemed a better use of
time to provide a way to delegate this functionality to a runtime instead
of building it into Dali.

So Dali 1.0's generic platform doesn't have any support for DDL
generation and it's expected that vendors or community members will either
contribute runtime platforms or make them available. Oracle has one in
development for Oracle TopLink 11g and TopLink Essentials. SAP hasn't
announced anything but has been discussing DDL generation on the dali-dev
mailing list so I strongly suspect they'll provide one for their runtime
also. Can anyone from SAP comment?

In the meantime, if you're using either Oracle TopLink 11g or TopLink
Essentials, invoking DDL generation is pretty easy. The Dali tutorial [1]
uses DDL generation to avoid having to ship SQL scripts for the demo
database. Open up the populatedb.jar and you'll find
PopulateDatabase.java and JPACommandLine.java. All it takes to get both
Oracle TopLink 11 or TopLink Essentials to generate DDL is to add a
property to the Map passed to the EntityManagerFactory and create an
EntityManager. The property and value are:

"toplink.ddl-generation", "drop-and-create-tables"

You can tweak a few more generation options [2] but that's the core of it.


Hope this helps,

--Shaun

[1]
http://www.eclipse.org/webtools/dali/docs/tutorial_1.0/dali_ jsf_tutorial.htm
[2]
http://www.oracle.com/technology/products/ias/toplink/jpa/re sources/toplink-jpa-extensions.html#CACIJBBA
Re: Problem with Generate DDL [message #602465 is a reply to message #434509] Thu, 19 July 2007 13:32 Go to previous message
Joost Kraaijeveld is currently offline Joost Kraaijeveld
Messages: 173
Registered: July 2009
Senior Member
Hi Shaun,

Shaun Smith wrote:
> Eric Debienne wrote:
>
>> So my question is How to get a Platform that will able to generate DDL
>> and how to configure Eclipse to use it.
>
> Hi Eric,
>
> Last year sometime a decision was made, after community consultation,
> to discontinue work on DDL generation because all of the JPA runtimes
> that we were aware of include DDL generation. It was deemed a better
> use of time to provide a way to delegate this functionality to a runtime
> instead of building it into Dali.
> So Dali 1.0's generic platform doesn't have any support for DDL
> generation and it's expected that vendors or community members will
> either contribute runtime platforms or make them available.

Does this answer mean that I can "only" use Dali to generate entities
from existing tables and that I cannot generate the to create tables
from existing entities if I use the generic platform ( I can re-engineer
entities but cannot forward-engineer databases)?

If I use JBoss 4.2 and PostgreSQL 8.2, is there a way to
"forward-engineer" a database somehow?



TIA

Joost
Re: Problem with Generate DDL [message #605073 is a reply to message #434522] Mon, 23 July 2007 11:57 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
That's correct. You can only generate entities when using the generic
platform provided by Dali. The concept is that JPA vendors will implement
their own platforms to provide DDL generation from existing entities in
Dali. I don't believe there are any publicly available platforms at the
moment for JBoss, but eventually there will be one.

JBoss runtime has the ability to forward-engineer the database, but for
the moment you would need to use the API's or command line to achieve
this, or use a specific JBoss tool.

The hope is that some day soon this functionality will be integrated with
Dali.

Neil


Joost Kraaijeveld wrote:
> Does this answer mean that I can "only" use Dali to generate entities
> from existing tables and that I cannot generate the to create tables
> from existing entities if I use the generic platform ( I can re-engineer
> entities but cannot forward-engineer databases)?

> If I use JBoss 4.2 and PostgreSQL 8.2, is there a way to
> "forward-engineer" a database somehow?



> TIA

> Joost
Previous Topic:New to JPA
Next Topic:one to one mapping problems
Goto Forum:
  


Current Time: Thu Jul 31 05:45:22 EDT 2014

Powered by FUDForum. Page generated in 0.02056 seconds