I thought the solution would be to set the class on the component to be an
implementation of the interface. However looking at the source code for the
hibernate xdoclet module it doesn't bother to look at the class and just
checks the class that the method returns.
.... here's a copy of a fragment of the code causing offence:
/**
* Gets the unique identifier of this predicate
*
* @return Unique ID of this predicate
* @hibernate.id
* @hibernate.component
class="com.yyyyyyy.ebasket.util.GUIDImplementation" prefix="predicate_guid"
*/
public GUID getPredicateIdentifier() {
return this.predicateIdentifier;
}
.... and heres the corresponding fragment of the hand crafted hibernate
mapping file that works.
<composite-id name="predicateIdentifier"
class="com.lastminute.ebasket.util.GUIDImplementation">
<key-property name="id" column="predicate_guid">
</key-property>
</composite-id>
What's the solution? Do you think this is a bug?
Kev
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Kevin
Richards
Sent: 30 July 2004 19:17
To: '[EMAIL PROTECTED]'
Subject: [Xdoclet-user] xdoclet/hibernate problems with components and
composite-id
I've got a problem with components and composite-ids with hibernate and
xdoclet.
I'm retrofiting hibernate onto an existing database and application, and I
have
several entitites with have a primary key of GUID, where GUID is an
interface.
If I try to use the GUID as an id then xdoclet/hibernate complains that is
not
serializable or does not implement equals(Object) - when in fact it does.
Is this a common problem? Any work arounds?
Kevin
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user