--- "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/

Reply via email to