David,

Your approach works but it pains me to do it, especially because I want to
inherit other concrete methods (not shown) from my Widget class.

I will move these concrete methods to your suggested "abstract" Widget
class. RealWidget will only contain the getId() method with the sequence
name tag. That way, my ProjectWidget class will not inherit both sequence
names.

Not optimal, but it will do for now... I'll refactor the RealWidget class
away when the bug is fixed in Xdoclet. I created a new JIRA issue for it:

http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1021

Thank you! :)
Thompson

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Harkness,
David
Sent: Friday, August 13, 2004 3:49 PM
To: [EMAIL PROTECTED]
Subject: RE: [Xdoclet-user] hibernatedoclet: inheritance and id sequences

Thompson Marzagao penned

> Thanks for your suggestion. But, my Widget base class is not
> abstract. Yet, even if I were to try to create the hierarchy
> AbstractWidget <- Widget <- ProjectWidget, I still need to define a
> sequence name in both Widget and ProjectWidget concrete classes.
> That's when hibernatedoclet creates this in ProjectWidget.hbm.xml:

Okay, we could make this more convoluted. Turn Widget into an abstract
class (not in the Java sense but just logically) and create two concrete
subclasses: ProjectWidget and RealWidget. RealWidget needs to add only
the tags for the sequence. Would that work?

> Is this a bug?

I'd say it's a bug for sure. Tag inheritance is quite handy, but it
shouldn't duplicate tags like that; it should override them. I suspect
it functions this way since it is allowed to have multiple parameter
tags; they should probably override for duplicate parameter names. Can
you please create a JIRA issue for this?

--
David Harkness                               Sony Pictures Digital
Sr. Software Engineer   310.482.4756    [EMAIL PROTECTED]


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user





-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to