hql原始语句: from eventdetail a ,eventconfig b where a.oid = b.oid a,b 两表,的hbm.xml没什么关联,如何实现左连接查询, 普通sql的实现是 select * from eventdetail a ,eventconfig b where a.oid = b.oid(+) , 求hibernate hql的实现语句?
发表于:2007-03-15 09:36:391楼 得分:0
大家交流下
发表于:2007-03-15 11:58:012楼 得分:0
我也想知道
发表于:2007-03-15 14:57:183楼 得分:0
你想返回的是一个对象还是两个
发表于:2007-03-15 15:05:454楼 得分:0
from eventdetail a left join fetch eventconfig b 返回一个eventdetail对象集合 其他就不会了
发表于:2007-03-15 15:06:585楼 得分:0
没设置外键。。。。不行
发表于:2007-03-17 14:26:336楼 得分:0
顶,我也同求!!
发表于:2007-03-18 23:15:487楼 得分:0
from eventdetail a ,eventconfig b where a.oid * = b.oid 这样不行吗? 当然了,返回对像集合肯定就不同了,得封装一个vo了,sql语句大体与是这样的啊??怎么不行吗,反正我这样用是对的了