hi,
i'm using xdoclet-hibernate-module-1.2.1 and have troubles with the composite-id.
Here's what i wrote :
/**
* The primary key class
*
* no hibernate tag here ?
*/
public class FooPK implements Serializable {
private String field1;
private String field2;
/**
* @hibernate.property
* column="field1"
*/
public String getField1() { ... }
public void setField1(...) { ... }
/**
* @hibernate.property
* column="field2"
*/
// same stuff
...
public int hashCode() { ... }
public boolean equals(Object o) { ... }
}
/**
* The entity class
*
* @hibernate.class
* table="foo"
*/
public class Foo {
private FooPK pk;
...
/**
* @hibernate.id
* generator-class="assigned"
*/
public FooPK getPK() { return pk; }
public void setPK(FooPK pk) { this.pk = pk; }
...
}
so, i get a "xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.hibernate.HibernateTagsHandler failed: ifHasCompositeId, line=132...."
when generating mapping file for Foo.
what do i miss?
regards
|