-->
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.  [ 5 posts ] 
Author Message
 Post subject: XDoclet support for joined-subclass, separate mapping?
PostPosted: Mon Dec 13, 2004 8:23 pm 
Newbie

Joined: Mon Dec 13, 2004 6:30 pm
Posts: 5
Hibernate version:
Hibernate 2.1.7c
XDoclet 1.2.2

I see that it is possible to have <subclass> and <joined-subclass> in a separate mapping files. I would like to use XDoclet to generate my mapping files, but it seems that it does not support this feature.

I have classes like:

Code:
/**
* @hibernate.class
* table="FOO"
*/
public abstract class Foo implements Serializable
{
    ...
}

/**
* @hibernate.joined-subclass
* table="BAR"
* @hibernate.joined-subclass-key
* column="BAR_ID"
*/
public class Bar extends Foo
{
    ...
}


But here is the thing, Bar is in a separate compilation unit than Bar, and in general most subclasses of Foo are unknown at compile time for Foo. When I try to generate for Bar, since Foo is not in the fileset, it is silently ignored by XDoclet (even with the surprisingly mute verbose feature turned on).

I see the same issue reported here:

http://forum.hibernate.org/viewtopic.php?t=935109
http://forum.hibernate.org/viewtopic.php?t=931574

I'm just starting out with XDoclet, so I am wondering if I am better off I'm better off writing the hbm files by hand. This just seems like the tip of the iceburg to me as far as XDoclet is concerned (along with lack of support for the 1.5 grammar).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 14, 2004 7:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Try: http://www.downside.ch/hibernate/ for an Xdoclet tutorial.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 15, 2004 6:01 pm 
Newbie

Joined: Mon Dec 13, 2004 6:30 pm
Posts: 5
Let me clarify, I have actually read a lot of the hibernate book already and all of the reference documentation guide. I have already been pretty successful with integrating Hibernate itself into my app.

In the document you refered me to, I see on pg 11 "XDoclet will only generate one mapping file (animal.hbm.xml) for all three classes". So I guess the answer to my original question is "No".

It doesn't seem like its worth digging around and maybe fixing the problem when it doesn't look like the XDoclet folks care to support the 1.2 version (see http://opensource.atlassian.com/project ... wse/XJD-41 ). It seems like they want to indulge in the fantasy that annotations don't make them irrelevant as they forge ahead on a whole new architecture. In the XDoclet postmortum, it will probably say something about them abandoning a stable program while their users jump ship: http://www.joelonsoftware.com/articles/ ... 00069.html

I hope im not coming off like a dick here. I actually like Hibernate a lot, the more I read and learn about it, the more I think "these guys really get it". Unfortunately, the more I look at XDoclet, the more I feel like Linda Blair.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 15, 2004 6:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I understand your view. The hibernate team is embracing annotations and once you see the annotation support start to come to light (very soon a alpha release with the beta 1 H3 release) you will start to see the 'Use Annotations Mantra'. The issue is just as you have said, the orginal XDoclet support 1.2.2 has been dropped for XDoclet2. My view is XDoclet 2 has not been managed well (even if its a good product etc bad PR, no offical releases etc). Having said that it appears XDoclet 2 does have good support for Hibernate and is being actively worked on.

http://www.sourceforge.net/projects/xdoclet-plugins/

In the short term I would like to see someone step up and just polish a few items in the XDoclet 1.2.x branch while XDoclet2 gets orgainsed. This will give the user base time to move the jdk5.0 and the future.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 16, 2004 6:04 am 
Senior
Senior

Joined: Wed Aug 27, 2003 4:08 am
Posts: 178
Location: Wiesbaden, Germany
david wrote:
In the short term I would like to see someone step up and just polish a few items in the XDoclet 1.2.x branch while XDoclet2 gets orgainsed. This will give the user base time to move the jdk5.0 and the future.


xdoclet 2 is organized and can be used in production. you only have to grab
relevant dependency specification for your maven.xml ( or download dependecies manually if you use ant ) and you are ready to go.

tag documentation is also up to time - it's generated automatically on regular basis

_________________
Got new hibernate xdoclet plugin? http://www.sourceforge.net/projects/xdoclet-plugins/
... Momentan auf der Suche nach neuen Projekt ode Festanstellung....


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