Inner Join with hibernate and HQL


   
      String queryString = "from Order o inner join fetch o.items as itm"
  
      + " where o.identifier = :id"
   
       
   
      (Order) getSession.createQuery(queryString)
   
      .setLong("id", someOrder.getIdentifier())
   
      .list();
   
       
   
       
   
      // Classes:
  
      Class Order
  
      private OrderItem item;






你可能感兴趣的:(java,Hibernate)