select a.id,a.name,b.id,b.sex from a,b where a.id=b.fkid
上面这句sql在hibernate中b.id如果不用别名,那么查询出来,b.id=a.id,这是为什么?
select a.id,a.name,b.id a bid,b.sex from a,b where a.id=b.fkid
这个问题经常坑我!我在这里备注一下,等有时间看看源码。
select a.id,a.name,b.id,b.sex from a,b where a.id=b.fkid
上面这句sql在hibernate中b.id如果不用别名,那么查询出来,b.id=a.id,这是为什么?
select a.id,a.name,b.id a bid,b.sex from a,b where a.id=b.fkid
这个问题经常坑我!我在这里备注一下,等有时间看看源码。