No need to apologize for the delay. Thanks for getting back at all. Delays over Xmas are to be expected.
I have an full sample project I can send you including the handcrafted mapping, the current xdoclet mapping plus changes to the jelly to make it work. Would you like any of this, and how would you like it delivered? Brendan -----Original Message----- From: Konstantin Priblouda [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 8:24 AM To: [email protected] Subject: Re: [xdoclet-user] Problem with hibernate xdoclet 2 joined-subclass and key with 2 column children --- "Johnston, Brendan" <[EMAIL PROTECTED]> wrote: Sorry for the delay. > Does anyone have any suggestions of either different annotations or > modifications to the hibernate xdoclet source to get a joined subclass > to have a two column key? At present, no. ( Just verified with source , and I consider this kind of a bug ) > I want to create xml like this: > > ... > > <joined-subclass name="model.Derived"> > <key> > <column name="k1" /> > <column name="k2" /> > </key> > ... > </joined-subclass> > ... > > > I tried this: > > /** @hibernate.joined-subclass > * @hibernate.joined-subclass-key > * @hibernate.key-column name="k1" > * @hibernate.key-column name="k2" > * */ > public class Derived extends Base { > > But got this: > > <joined-subclass name="model.Derived"> > <key/> > </joined-subclass> > > > > Any suggestions on my use of annotations, or changes to the jelly > implementation would be very welcome. > > Critiques of the database design are valid, but are less useful. Does handcrafted hibernate mapping work? I read docs, and there is nothing about several columns ( though DTD allows this ) : ----------------%<-------------------- No discriminator column is required for this mapping strategy. Each subclass must, however, declare a table column holding the object identifier using the <key> element. ----------------%<-------------------- Single column discriminator ( as column="whatever" would work ) Is your object identifier by chance composite? regards, ----[ Konstantin Pribluda http://www.pribluda.de ]---------------- Still using XDoclet 1.x? XDoclet 2 is released and of production quality. check it out: http://xdoclet.codehaus.org __________________________________ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/
