bee
bee copied to clipboard
1.11版本 suid.select查询使用缓存的情况,会报类型转换错误,实际类型是正确的。降到1.9.8版本恢复正常
suid.select(order)查询第1次能正确返回结果,第2次命中缓存,返回结果是List<Order> ,从这个List中取第0个Order赋值给一个Order类型的变量时会报类型转换异常,每次都能复现。将版本恢复到1.9.8之后恢复正常。
你好,没能重现,你说的情况. 可以将你的测试代码,Order实体代码, bee.properties配置信息 贴出来
只找到一个类似的问题.
#since V1.11
#prototype: 0 not prototype, but faster; 1:prototype,if have NotSerializableException, do not put in cache, slower, but safer; 2 : prototype, but have NotSerializableException,return original
#high safe cache,the javabean(entity) need implements Serializable interface.
bee.osql.cache.prototype=2
bee.osql.cache.prototype=2 且实体没有实现序列化时. 会提示序列化异常. 但Bee框架采用了相应的处理方法, 请看上面配置相应说明.
要是实体没有实现序列化, 要兼容V1.11之前的代码, 可设置: bee.osql.cache.prototype=0