-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
Author Message
 Post subject: Beginner questions about Hibernate Middlegen
PostPosted: Sun Feb 01, 2004 12:34 pm 
Regular
Regular

Joined: Sat Oct 11, 2003 11:13 am
Posts: 69
I don't understand the use of Middlegen.

I think I cannot do these steps with Middlegen:

1. Graphically design the Domain Model in a object oriented way (including inheritance and so on) with UML class diagram.
2. Generate .hbm files or Java classes with hibernate Xdoclet tags.
3. Generate and execute DDL.
4. For further modifications of the domain model, read the hbm files, not the DDL scripts.

As far as I read it, this is not possible with Middelgen.
1. First you have to input a DDL script which you have to write yourself or get it from somewhere.
2. Then you can see a ERD in the GUI and modify it. But it is not object oriented, maybe because Middlegen originally was made for Entity Beans.
3. Then you can generate hbm files. After this you can generate Java classes. You can not generate Java classes with hibernate Xdoclet tags without generating hbm files prior.
4. Then you can generate and execute DDL.
5. For further modifications of the domain model, the Middlegen properties are read, not the hbm files.

Please correct me if I am wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 12:36 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Middlegen is for users with existing database schemas, called "legacy" databases. It is not the right tool if your approach is "top down", starting with a domain model.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 12:40 pm 
Pro
Pro

Joined: Mon Sep 08, 2003 4:30 pm
Posts: 203
christian wrote:
Middlegen is for users with existing database schemas, called "legacy" databases. It is not the right tool if your approach is "top down", starting with a domain model.


Hi,

What would be the right tool for "top down" approach?

TIA,
--steve p.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 12:44 pm 
Regular
Regular

Joined: Sat Oct 11, 2003 11:13 am
Posts: 69
Thanks. This explains everything. ;)

Which way would you go? Create Hibernate hbm files or Java files with Hibernate XDoclet tags?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 12:58 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Just updated: http://www.hibernate.org/102.html

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 8:51 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
At last years JAOO we did a tool workshop which coverned the various approaches. Have a read and a play. http://hibernate.bluemars.net/159.html.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.