Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0.5
Mapping documents:3.0.5
My Sql Statement:
Code:
SELECT reservation.reserve_year AS business_year,
reservation.reserve_month AS business_month,
reservation.reserve_day AS business_day, '##' AS table_state,
reservation.reservation_num AS bill_num, reservation_type AS bill_type,
reservation_detail.table_num AS table_num,
reserve_cust_count AS cust_count, reservation.reverve_time AS action_time,
reservation.period_num AS period_num,
reservation_detail.state_name AS state_name,
reservation_detail.state_code AS state_code
FROM reservation INNER JOIN
reservation_detail ON
reservation.reservation_num = reservation_detail.reservation_num
WHERE (reservation_detail.state_code & 2 ^ 2 = 0) AND
(reservation_detail.state_code & 4 ^ 4 <> 0) AND
(reservation_detail.state_code & 8 ^ 8 <> 0) AND
(reservation_detail.state_code & 16 ^ 16 <> 0))
but i don't know how to mapping corresponding hsq, the statement "
reservation_detail.state_code & 2 ^ 2 = 0" how to write in hql, i try to write "
r.state.stateCode & 4 ^ 4 = 0", but hibernate throws exception "
org.springframework.orm.hibernate3.HibernateQueryException: unexpected char: '&'"
has anyone know about the question, thanks.
Full stack trace of any exception that occurs: