hibernate中怎么不能用inner join啊?
在hibernate中我查询两张表中的数据,我这样写查询语句,但就是抱错
select t.name,t.type,s.name from Ren t inner join Type s on t.type=s.id
错误如下:
org.hibernate.hql.ast.QuerySyntaxException: unexpected token: on near line 1, column 64 [select t.name,t.type,s.name from liubi.Ren t inner join Type s on t.type=s.id]
------解决方案--------------------select t.name,t.type,s.name from Ren t inner join t.type s
------解决方案--------------------select t.name,t.type,s.name from Ren t , Type s where t.type=s.id