Bug in Parsing NOT MEMBER OF?
davidsills Aug 6, 2002 9:15 PMI'm continuing through the Monson-Haefel book. Still a slog, and JBoss continues to perform well. This one point about Exercise 8.2 I can't seem to overcome, so I thought I'd post excerpts from the server log:
2002-08-06 19:59:49,490 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findMemberOf] EJB-QL:
SELECT OBJECT( crs ) FROM Cruise crs, IN (crs.reservations) res, Customer cust
WHERE cust = ?1 AND cust MEMBER OF res.customers
2002-08-06 19:59:49,500 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findMemberOf] SQL: SELECT t0_crs.ID FROM Cruise t0_crs, Reservation t3_res, Customer t1_cust, Customer t2_res_customers, customer_reservation_link t4_res_customers_RELATION_TABLE WHERE ((t1_cust.ID=?) AND (t2_res_customers.ID = t1_cust.ID)) AND (t3_res.ID=t4_res_customers_RELATION_TABLE.RESERVATION_ID AND t2_res_customers.ID=t4_res_customers_RELATION_TABLE.CUSTOMER_ID AND t0_crs.ID=t3_res.CRUISE_ID)
2002-08-06 19:59:49,500 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findNotMemberOf] EJB-QL:
SELECT OBJECT( crs ) FROM Cruise crs, IN (crs.reservations) res, Customer cust
WHERE cust = ?1 AND cust NOT MEMBER OF res.customers
2002-08-06 19:59:49,500 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CruiseEJB.findNotMemberOf] SQL: SELECT t0_crs.ID FROM Cruise t0_crs, Reservation t2_res, Customer t1_cust WHERE ((t1_cust.ID=?) AND (t4_res_customers_RELATION_TABLE.RESERVATION_ID IS NULL AND t1_cust.ID=t4_res_customers_RELATION_TABLE.CUSTOMER_ID)) AND (t0_crs.ID=t2_res.CRUISE_ID)
I'm not sure why the alias t4_res_customers_RELATION_TABLE is not defined (it is in MEMBER OF above), among other questions. I could, of course, overwrite it with <declared-sql>, which is what I did for the bug about Booleans in MySql (which is TINYINT): simpler for me than downloading a whole new build. But I thought someone would want to know, as I couldn't find mention of it elsewhere.
Hope this helps!