> Gesendet: Montag, 24. Januar 2005 13:20 > An: xdoclet-user@lists.sourceforge.net > Betreff: Re: AW: AW: [Xdoclet-user] [XDoclet + Hibernate] UserType as > @hibernate.id possible??? > > > --- Konstantin Priblouda wrote: > > I think exactly this is supported. YOu have your > custom type, you have getter returning this type, and > then you put @hibernate.id - and you have your custom > type ID... > Unfortunately no :-( Here again my little example
who I try it: /** * @return Returns the
id. * @hibernate.id type =
"SpecialClassType"
unsaved-value = "none" *
generator-class="SpecialClassGenerator" */ public SpecialClass getId() { return id; } XDoclet generates
this: <composite-id
name="id"
class="my.package.SpecialClass"
unsaved-value="none"
>
</composite-id> But hibernate need this: <id
name="id"
type="my.package.SpecialClassType"
unsaved-value="none"
>
<generator
class="SpecialClassGenerator"/> </id> Best regards, Tobias |
- Re: AW: AW: AW: [Xdoclet-user] [XDoclet + Hibernate] ... Tobias Joch
- Re: AW: AW: AW: [Xdoclet-user] [XDoclet + Hibern... Konstantin Priblouda