支持直接表关联和左右连接(join)....具体语法结构和SQL是一样得文档上得HQL一章里面有讲例子在文档最后的例子里面也有

解决方案 »

  1.   

    不多表,还有谁会去用Hibernate?
    根本就没认真看hibernate参考手册,上面有很多是涉及多表操作的
    要用面向对象的思考,不能用以往的表关系思考
      

  2.   

    同意楼上mudsong(寻找可能)(江西上饶)public class Order {
    private int orderId;
    private Customer customer;
    private Employee employee;
    private Date OrderDate;
    private Set orderDetails=new HashSet();
    /**
     * @hibernate.many-to-one column="CustomerID" name="getCustomer"
     * @return Returns the customer.
     */
    public Customer getCustomer() {
    return customer;
    }
    /**
     * @param customer The customer to set.
     */
    public void setCustomer(Customer customer) {
    this.customer = customer;
    }
             ......
    }
      

  3.   

    假设有两个表TBL_A和TBL_B,分别对应到两个类model.ClsA和model.ClsB,ClsA通过model.ClsA.refB引用ClsB,则通过查询ClsB获得ClsA的数据代码如下:select a 
    from 
    model.ClsA as a, 
    model.ClsB as b
    where a.refB = b
    and b.id = '007'
    当然还有其他方式,多看文档。多去hibernate论坛。
      

  4.   

    当然可以,要不然,hibernate其不是成了废品,去hibernate中文网,里面资料很全