hi,
I am trying to create nested components:
Code:
public class FullName implements Serializable{
private String firstName;
private String lastName;
....
}
Code:
public class Comment implements Serializable{
private FullName name;
private String comment;
...
/**
* @hibernate.component class="FullName"
*/
public getName(){
return name;
}
...
}
Code:
public class Photograph implements Serializable{
private Integer id;
private String photoUrl;
private Set<Comment> comments = HashSet<Comment>();
...
/**
* @hibernate.set table="PHOTO_COMMENTS"
* @hibernate.key column="PHOTO_ID" not-null="true"
* @hibernate.composite-element class="Comment"
*/
public getComments(){
return comments ;
}
...
}
when I am running XDoclet plugin, i get an error:
Quote:
Element type "g:fail" must be declared.
when I remove the nested component FullName from Comment,
all works fine.
i will be happy to know if there is a problem in creating nested components.
else, what am i doing wrong?
thanks,
Nadav.