Hi all,
I have the following entity: @Entity public class FormattedDate { @Id private Long id;
@Transient private SimpleDateFormat sdf; ... @AccessType("property") @Column(name="format") public String getFormat() { return sdf.toPattern(); }
public void setFormat(String format) { this.sdf = new SimpleDateFormat(format); this.sdf.setLenient(false); } .. }
So I supose that when I save a FormattedField object to database, the property 'format" should be saved too. But in my tests it didn't work.
Does anyone know exactly how the AccessType annotation works? Or how could I get the behavior I need?
Thanx
|