select b.* from Blog b inner join Friend f on b.uid=f.fuid where f.fuid=?
用sql怎么写

解决方案 »

  1.   

    HQL 建议到java的版块去问一下。
      

  2.   

    试下是不是这样:
    select b from Blog b inner join b.Friend f where f.fuid='值'
      

  3.   

    如果Blog没有Friend 集合属性,故你上面的可以采用SQL风格的隐式内连接查询语句:select b from Blog b,Friend f where b.uid=f.fuid and f.fuid='值'