-->
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.  [ 2 posts ] 
Author Message
 Post subject: getAllPropertiesIterator gives incomplete list of fields
PostPosted: Fri Aug 24, 2007 8:24 am 
Regular
Regular

Joined: Wed Nov 01, 2006 2:17 pm
Posts: 78
Hello,

I am using freemarker to receive all fields of a pojo like this:

Code:
<#foreach field in pojo.getAllPropertiesIterator()>.....


Unfortunately for one of my annotated entities there are two fields ignored. All the other fields are processed correctly (composite ID and the fields inherited by BasicEntity). The fields ignored are annotated as @Basic and @Temporal:

Code:
@Entity
@Table(name = "ASSET_USER_COMMENTS")
@IdClass(AssetUserCommentsId.class)
public class AssetUserComments extends BasicEntity {

   // Fields
   @Id
   @ManyToOne
   @JoinColumn(name="assetid", nullable=false)   
   private Asset asset;

   @Id
   @ManyToOne
   @JoinColumn(name="userid", nullable=false)
   private Users users;

   @Id
   @ManyToOne
   @JoinColumn(name="commentsid", nullable=false)   
   private Comments comments;

                // THIS ONE IS IGNORED
   @Temporal(TemporalType.DATE)
   private Date dateofcomment;

                // THIS ONE IS IGNORED AS WELL
   @Basic
   private Long revision;


What is wrong? How can I iterate through ALL fields?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 8:57 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
that sounds very weird - that means all pojo generation would also not work....

getAllPropertiesIterator() should give you these.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.