There's nothing special about mapping a composite ID using XDoclet from mapping a primitive ID, just use @hibernate.id tag as you always do:
/**
* @hibernate.id
*/
public YourCompositeId getId() {
return id;
}
XDoclet automatically detects from the return type whether the ID is composite or primitive. As primitive ID data types are considered int, long, float, double, boolean, byte, short, char, java.lang.Byte, java.lang.Double, java.lang.Float, java.lang.Integer, java.lang.Long, java.lang.Short, java.lang.String, java.math.BigDecimal and User Types. Any other data type (including your composite ID class) is considered as composite (ie. including java.util.Date). I use XDoclet CVS build 1.2.2.
HTH,
Pavel
|