-->
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.  [ 7 posts ] 
Author Message
 Post subject: newbie question - Best tool for creating hibernate mappings
PostPosted: Wed Mar 24, 2004 12:59 am 
Beginner
Beginner

Joined: Wed Mar 17, 2004 12:44 am
Posts: 25
Hello,

Which tool is best for creating hibernate mappings ? Can this tool test the mappings too ? or do I have to get another that does this for me ..

nitin


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 6:18 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
You can mark up your sourcecode with Javadoc tags and use XDoclet to generate the mappings. I prefer a good IDE (IntelliJ) with validation and autocompletion for XML (Hibernate mappings have a DTD).

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 6:15 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I'm more and more using the same good old way than Christian do. I find mapping files very readable (more than xdoclet actually).

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 26, 2004 10:07 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
It come down to personal preference - best is always subjective. Why don't you try out the tools demo and try the various approaches. As far as validating the XML as a result of a tool generating it, you could use the xmlvalidate ANT task.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 27, 2004 4:15 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
personnaly i think that if you have to think your domain model on an existing db, it's usefull to have the db info into the classes so using xdoclet is great, but in version 1.2 i found a least 3 limitation:
1- joined subclasses with composite id
2- formula is not available
3- 2 times the same component in a class

maybe i did it bad, maybe there are more limitations.
Just try 2 or 3 methods, definitly:
Quote:
best is always subjective


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 07, 2006 12:24 pm 
Regular
Regular

Joined: Mon Sep 20, 2004 8:42 am
Posts: 58
Location: Boston, US
David, Christian :
Since your post in 2004 on this subject, have your thoughts on using XDoclets changed or do you still prefer writing the mapping files yourself.

Thanks,
Sanjiv


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 07, 2006 8:41 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I am still using XDoclet actively. I had also joined the effort to bring Xdoclet 1.2.x -> 1.3.x series up a high level of support for H3. I am comfortable using many different approaches but as a project tends to get larger I generally move from mapping files to XDoclet (and will use Annotations if JDK requirements will allow it).

Go with what you mostly feel comfortable. All approaches have good IDE support if you select the right plugins etc.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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.