.setLong("quantity", 1L).setString("name", "Acme Hair Gel").setString("buyer", "gavin").list();
assertEquals("Incorrect orders count", 1, orders.size());
session.enableFilter("region").setParameter("region", "APAC");
session.enableFilter("effectiveDate").setParameter("asOfDate", testData.lastMonth.getTime());
orders = session.createQuery("select o from Order as o where exists (select li.id from LineItem li where li.quantity >= ? and li.product in (select p.id from Product p where p.name = ?)) and o.buyer = :buyer")
.setLong(0, 1L).setString(1, "Acme Hair Gel").setString("buyer", "gavin").list();
assertEquals("Incorrect orders count", 1, orders.size());