代码是
String myQuery = "select c.orderId from com.model.Supplier su join com.model.Supplier su2 join su2.product P where su.product.OrderId = :Order and c.order != :Order ";
List<Order> myOrder= getCurrentSession().createQuery(myQuery.toString()).setParameter("Order", aOrder).list();
当执行上述行时,我在屏幕上出现了一个错误<
java.lang.IllegalStateException: DOT node with no left-hand-side!
at org.hibernate.hql.ast.tree.DotNode.getLhs(DotNode.java:631)
at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:606)
at org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:383)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3671)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3452)