java字符串数据,右截断带Spring Boot的Hibernate
所以我有一个实体类工作得很好。今天我添加了一个新字段:
ButtonTargetBehavior buttonTargetBehavior;
ButtontTargetBehavior是一个接口(实现可序列化)。每当我尝试运行我的spring boot应用程序时,我都会得到这样的结果
string data, right truncation
引用该字段的错误(是的,我实际上保存了实现接口的类的实例,例如:
public class RandomButtonTargetBehavior implements ButtonTargetBehavior
)
我使用HSQLDB进行测试,并在生产中使用MySQL。我需要做什么
# 1 楼答案
由stackoverflow修复。com/questions/2121860/。我认为最合适的解决方案是自定义类型