--- Eric Mckenna <[EMAIL PROTECTED]> wrote:
> 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(Hibernate
> TagsHandler.java:324)
> [hibernatedoclet] at
>
xdoclet.modules.hibernate.HibernateTagsHandler.ifHasPrimitiveId(HibernateTag
> sHandler.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?
You need a bit more of xdoclet tags :)
1. Put @hibernate.id on getter
returning your composite id class use "assigned"
generator
2. put @hibernate.property on respective properties of
your composite id class.
When in doubt - use recent CVS version.
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:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user