title: selecting records from tables using HQL Query..........@
body: <p>how to select records from multiple tables by using HQL Query..</p>
  
  <pre><code>    Session session=dao.getSessionFactory().openSession();
  
      Query query=session.createQuery("from b.Customer_name PurchaseDetailBean p,BookingBean b where p.Booking_Id=b.Booking_Id ");
  
  
      System.out.println("dlkkdc"+query);
  
      arg0.getPortletSession().setAttribute("query", query);
  
        Query q1 = (Query) arg0.getPortletSession().getAttribute("query");
        Gson gson = new Gson();
  
  
      System.out.println("***" + gson.toJson(q1.list()));
      arg0.getPortletSession().setAttribute("adminsales", gson.toJson(q1.list()));
      System.out.println("iiiiiiiiiiiiiiiiiiiiiiii"+gson.toJson(q1.list()));
  </code></pre>
  
  <p>ITZ showing error::</p>
  
  <p>org.hibernate.hql.ast.QuerySyntaxException: unexpected token: p near line 1, column 41 [from b.Customer_name PurchaseDetailBean p,Com.bean.BookingBean b where p.Booking_Id=b.Booking_Id ]</p>