JPA中绝对必要的列注释?

我还有一个关于JPA的问题。 如果我想将它存储在我的数据库中,是否有必要使用@Column注释每个成员变量? 或者是否可以通过某些成员变量(在这些示例中为“timestamp”字段)将其遗漏,并且此字段将在每个可能的方案中存储在数据库中:

@Entity @Table(name = "usercontent") public class UserContentEntity implements Persistable { /** serialVersionUID */ private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @Column(name = "description") private String contentdescription; @Column(name = "name") private String contentname; @Column(name = "bytes") @Lob private byte[] contentbytes; @Column private String creator; private Date timestamp; // get- and set methods } 

当使用注释@Column是绝对必要的吗?

非常感谢Maik

不,它不是“必要的”,除非你想覆盖默认的列命名,或默认的数据存储列类型等。而且只是把@Column无论如何都不会这样做