解决:Unable to locate Attribute with the the given name [] on this ManagedType[com.XXX]

用了个自己封装的Criteria类做查询用,一直没什么问题,这次做查询却一直报错:

Unable to locate Attribute  with the the given name [] on this ManagedType[com.XXX]

在网上查了半天攻略试过都不行,自己又去扒拉代码一点点调试,找了半天,发现是粗心大意惹的祸:

如图,对应实体属性没有填,结果就报错了,填上以后再查询,Ok了就!

猜你喜欢

转载自blog.csdn.net/yssa1125001/article/details/89138835