Title: RE: [Xdoclet-user] Xdoclet 1.2b3 will not merge hibernate composite key

I do have a class for the composite ID.  But it stands alone, I use the constructor
to create relations and either look them up if existing or save them if they are new relations.

With the new b4 release, HibernateTagsHandler changed, so
from my stack trace

[hibernatedoclet] Caused by: xdoclet.XDocletException: Class com.brainbench.model.trial.ECPromoECItemRelation misses ID property

[hibernatedoclet]       at xdoclet.modules.hibernate.HibernateTagsHandler.hasCompositeId_Impl(HibernateTagsHandler.java:324)

[hibernatedoclet]       at xdoclet.modules.hibernate.HibernateTagsHandler.ifHasPrimitiveId(HibernateTagsHandler.java:157)

you can see that xdoclet is calling ifHasPrimitiveId(), this method calls hasCompositeId_Impl(template, false) which tells me that I need something in my class to tell xdoclet to use a composite id.

My class which look likes this,

/* @hibernate.class table="RelationTable" -- this is the only hibernate tag i previously needed */
public class SomeClass implements Serializable {
 public SomeClass(int compKeyOne, int compKeyTwo) { ... }
 public int getCompKeyOne() {...}
 public int getCompKeyTwo() {...}
 public void setCompKeyOne(int key) {...}
 public void setCompKeyTwo(int key) {...}
 public boolean equals() { ... }
 public int hasCode() { ... }
}

Does not have anything that would provide that signal. Is there a different xdoclet tag I should now use?
 
The only work around i have right now is to keep the older beta2 jars and generate the hibernate files with those and use the newer xdoclet jars for everything else, or to just not generate that particular file.

I'm also checking the hibernate list to be sure I'm using the composite key in the way its intented and maybe get suggestions about changing the class.

thanks,
eric.

> -----Original Message-----
> From: Konstantin Priblouda [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, August 23, 2003 11:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-user] Xdoclet 1.2b3 will not merge hibernate
> composite key
>
>
>
> --- Eric Mckenna <[EMAIL PROTECTED]> wrote:
> > I'm having a problem with xdoclet file merging a
> > hibernate composite key
> > correctly.  Previously i was just merging in the
> > composite id with an
> > xdoclet merge file, But after moving to beta3 of
> > xdoclet, I keep getting
> > "misses ID property" message from xdoclet, since the
> > class that uses a
> > composite key is does not have an @hibernate.id
> > attribute.
>
>
> it's ercommended by hibernate folks that you define
> class which would be your composite id ( lok for "why
> object being own identity suks" in hibernate docs ).
> Just declare getter of this id class as ID field (
> assigned ) and define properties on his getters.
>
> regards,.
>
> =====
> ----[ Konstantin Pribluda ( ko5tik ) ]----------------
> Zu Verstärkung meines Teams suche ich ab Sofort einen
> Softwareentwickler[In] für die Festanstellung.
> Arbeitsort: Mainz
> Skills:  Programieren, Kentnisse in OpenSource-Bereich
> ----[ http://www.pribluda.de ]------------------------
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a
> single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
> at the same time. Free trial click
> here:http://www.vmware.com/wl/offer/358/0
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-user
>

Reply via email to