1042843694 发表于 2018-3-7 22:37:13

hibernate的hql的对象导航查询问题

hql的对象导航查询可以对象多少个?我现在是通过了两个对象。报异常了,异常里有执行的hql
org.hibernate.QueryException: could not resolve property: currentDepart of: org.jeecgframework.web.system.pojo.base.TSUser [ FROM com.jeecg.food.entity.JeecgFoodEntity WHERE 1=1and tSUser.currentDepart.orgCode ='A04' ORDER BY mealDate DESC ]

,求大神指教一下,谢谢

1042843694 发表于 2018-3-8 09:11:43

补充

admin 发表于 2018-3-8 09:26:55

建议用minidao

1042843694 发表于 2018-3-9 17:13:46

admin 发表于 2018-3-8 09:26 static/image/common/back.gif
建议用minidao

恩恩,已解决,通过连对象
FROM JeecgFoodEntity a ,TSUser u ,TSDepart d WHERE a.tSUser.id=u.id AND u.departid=d.id
页: [1]
查看完整版本: hibernate的hql的对象导航查询问题