美文网首页
Object [id=103] was not of the s

Object [id=103] was not of the s

作者: 1ff5a98e5398 | 来源:发表于2018-11-07 21:50 被阅读12次

今天使用JPA 查询遇到了这么一个问题:
Object [id=103] was not of the specified subclass [xxx.xxx.xxx],一直没找到问题所在。最后通过代码review才看出来端倪:原来是自己一个数据库映射对象继承了另一个数据库映射对象,这造成了JPA出现了异常。
不要使用继承即可。

相关文章

网友评论

      本文标题:Object [id=103] was not of the s

      本文链接:https://www.haomeiwen.com/subject/hxmbxqtx.html