-->
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.  [ 3 posts ] 
Author Message
 Post subject: @hibernate.collection-composite-element
PostPosted: Sun Mar 18, 2007 1:08 pm 
Newbie

Joined: Thu Oct 26, 2006 4:11 pm
Posts: 3
hi,
i am new to Hibernate, and i am trying to create a List of composite element .

The component class is "Comment", and i want "Process" class to hold List of comments.

I created a component class named "Comment" :

Code:
public class Comment {
   
  private String comment;
  private long createdTimeStamp;
  private User createdBy;
}


and i am trying to create a List of component class "Comment" in another class named "Process":

Code:
public class Process{
   
   private List<Comment> comments = new ArrayList<Comment>();
   
  /**
  *
  * @hibernate.list table="ENTITY_COMMENTS"
  * @hibernate.collection-composite-element class="Comment"
  * @hibernate.collection-index column="COMMENT_INDEX"
  */   
  public List<Comment> getComments() {
    return comments;
  }


When I try to run XDoclet plugin, I am getting an error:
Quote:
The content of element type "list" is incomplete, it must match "(meta*,subselect?,cache?,synchronize*,comment?,key,(index|list-index),(el
o-many|many-to-many|composite-element|many-to-any),loader?,sql-insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".


I will be happy for any kind of help..

thanks,
Nadav.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 5:27 am 
Newbie

Joined: Fri Mar 23, 2007 4:47 am
Posts: 16
Where is your @hibernate.key tag?

By the way
* @hibernate.collection-composite-element class="Comment"
* @hibernate.collection-index column="COMMENT_INDEX"
are deprecated. Try:
* @hibernate.composite-element class="Comment"
* @hibernate.index column="COMMENT_INDEX"


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 23, 2007 6:41 am 
Newbie

Joined: Thu Oct 26, 2006 4:11 pm
Posts: 3
I removed the ID property from the example just to save some space.

About the deprecated remark - thanks.


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

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.