2012.10.25

hibernate原生sql查询bug?

select t1.id, t2.id from person t

left join organization t1 on t1.id = t.org_id

left join organization t2 on t2.id = t.dept_id

查询返回的结果只有t1.id,即是Object[]{t1.id,t1,id},sql中给t1.id, t2.id加上别名后才返回Object[]{t1.id,t2,id}

你可能感兴趣的:(2012.10.25)