2012-06-18 29 views
2

我是新来openjpa并得到此警告。openjpa现有列不兼容

Existing column ... is incompatible with the same column name in the given schema definition. 

它列出的差异,并以字段(VARCHAR)的大小不同,那就是它显示150和255 150是我指定为DB尺寸大小,但我不知道的255.在实体类中,String类型的相应字段。

请帮我这个。

回答

1

OpenJPA假定字符串列将在数据库中为255。由于您的列不是,您可以使用@ javax.persistence.Column注释指定该非默认值。

@Column(name = "BOOYA_MSG", length = 150) 
protected String message;