Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Choose Relationships to Generate Dialog Box does not appear(Choose Relationships to Generate Dialog Box)
Choose Relationships to Generate Dialog Box does not appear [message #522991] Wed, 24 March 2010 16:58 Go to next message
bob is currently offline bob
Messages: 8
Registered: March 2010
Junior Member
Hello group,

I installed Eclipselink version 2.0.1 and try to use it for ORM.I Created the project.
and successfuly Import database tables From an Existing Data Model in MySQL.

in next step to generate classes from tables I chose:

Selected > Generate Classes and Descriptors from > Selected Tables or All Tables from the menu


then I Completed each field on the Generate Classes and Descriptors dialog box and click OK

In next step according to the user mannual

http:// wiki.eclipse.org/Using_Workbench_%28ELUG%29#Generating_Class es_and_Descriptors_from_Database_Tables


I am suppose to get "Choose Relationships to Generate Dialog Box" where I have forign keys point to the reference tables in my tables

But this dialog box does NOT appear!!

Any help to solve this problem?


Thanks
b.

[Updated on: Wed, 24 March 2010 17:57]

Report message to a moderator

Re: Choose Relationships to Generate Dialog Box does not appear [message #523266 is a reply to message #522991] Thu, 25 March 2010 17:27 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Do your tables have any foreign key constraints? If not then you will not get the dialog.

Note that the Mapping Workbench is only for using the old native EclipseLink API, not for JPA, which most new applications use. For JPA you can use any JPA tool, such as Eclipse Dali, or Oracle JDeveloper, or code the annotations by hand.


James : Wiki : Book : Blog : Twitter
Re: Choose Relationships to Generate Dialog Box does not appear [message #523282 is a reply to message #523266] Thu, 25 March 2010 18:33 Go to previous messageGo to next message
bob is currently offline bob
Messages: 8
Registered: March 2010
Junior Member
Thank you for your reply.

Yes I have foreign keys in two of my tables with reference to to other tables.

I just wanted to create classes and put annotation for mapping inside the classes that is why I am using eclipselink. but you indicated that eclipselink 2.0.1 does not do the mapping?!

Quote:

Note that the Mapping Workbench is only for using the old native EclipseLink API, not for JPA, which most new applications use. For JPA you can use any JPA tool, such as Eclipse Dali, or Oracle JDeveloper, or code the annotations by hand.




Then what it means in this link?I am really confuse.

I am Using Workbench at:

http:// wiki.eclipse.org/Using_Workbench_%28ELUG%29#Generating_Class es_and_Descriptors_from_Database_Tables


Thanks
Bob
Re: Choose Relationships to Generate Dialog Box does not appear [message #523298 is a reply to message #522991] Thu, 25 March 2010 19:34 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The Mapping Workbench is how mappings were defined before the JPA standard. This exports EclipseLink specific XML for the EclipseLink specific mapping API that was used before JPA. The doc is just documenting this old feature/model (I agree the docs are confusing and we are working on updating them).

For a new application, I would recommend you use JPA, and do not use the Mapping Workbench. If you need to generate classes from tables, you can use Eclipse's JPA tooling support (Dali).

I suppose you could just use the MW to generate you java files, and then edit them by hand, and add the JPA annotations, but it would be better to use a proper JPA tool.


James : Wiki : Book : Blog : Twitter
Previous Topic:JPA and historic sessions, HistoryPolicy, etc.
Next Topic:Optimizing EclipseLink generated SQL
Goto Forum:
  


Current Time: Fri Oct 31 14:34:09 GMT 2014

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

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