I've got the following class that represents a
join-table with an additional column.
public class GroupChoice implements Serializable {
public static class Id implements Serializable {
private Long _groupId;
private Long _choiceId;
public Id(Long groupId, Long choiceId) {
this._groupId = groupId;
this._choiceId = choiceId;
}
public boolean equals(Object o) {
return true;
}
public int hashCode() {
return 29;
}
}
private Group group;
private Choice choice;
public GroupChoice(Group g, Choice c) {
this._group = g;
this._choice = c;
}
/**
* @hibernate.id
*/
public GroupChoice.Id getId() {
return new GroupChoice.Id(_group.getId(),
_choice.getId());
}
The error I'm getting is:
Composite ID property of type GroupChoice.Id is
invalid. It has to be serializable and reimplement
equals(Object)
What am I doing wrong here?
Thanks
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
xdoclet-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user