-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: nested components
PostPosted: Tue Mar 20, 2007 11:24 am 
Newbie

Joined: Thu Oct 26, 2006 4:11 pm
Posts: 3
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.