I'm trying to map an existing table to a Class. The table has only three columns: ID, content, lastUpdateAt.
I created a JPA Annotated class with three fields like:
Code:
@Entity
@Table(name = "keyvaluetable")
public class Property {
@Id
@Column(name = "ID", length = 50, nullable = false)
private String key;
@Lob
@Column(name = "content", nullable = false)
private String value;
@Column(name = "lastUpdateAt", nullable = false)
private Date lastUpdateDate;
//Getter and setters...
}
When I tried to validate the schema hibernate was looking for column with name last_update_at. Changing the jpa annotation to @Column(name = "
lastupdateat", nullable = false) the validation took place just fine.
I'm using Hibernate entity manager version 3.2.1.ga