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?