Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 openjpa 的新手并收到此警告。
Existing column ... is incompatible with the same column name in the given schema definition.
它列出了差异,并且使用字段(varchar)大小不同,即显示 150 和 255。150 是我在 db 中指定为大小的大小,但我不确定 255。在实体类中String 类型的对应字段。
请帮我解决一下这个。
OpenJPA 假设数据库中的字符串列将是 255。由于您的列不是,您可以使用 @javax.persistence.Column 注释指定该非默认值。
@Column(name = "BOOYA_MSG", length = 150) protected String message;