Hibernate version: 3.2
Mapping documents:
20:54:56,281 INFO HbmBinder:300 - Mapping class: domain.Office -> office
20:54:56,281 DEBUG HbmBinder:1270 - Mapped property: id -> office_id
20:54:56,281 DEBUG HbmBinder:1270 - Mapped property: name -> name
20:54:56,328 INFO HbmBinder:300 - Mapping class: domain.Property -> property
20:54:56,328 DEBUG HbmBinder:1270 - Mapped property: id -> property_id
20:54:56,343 DEBUG HbmBinder:1270 - Mapped property: office -> office_id
20:54:56,343 DEBUG HbmBinder:1270 - Mapped property: style -> type_id
20:54:56,343 DEBUG HbmBinder:1270 - Mapped property: address -> address_id
20:54:56,343 DEBUG HbmBinder:1270 - Mapped property: appearOnPublic -> public_access
20:54:56,343 DEBUG HbmBinder:1270 - Mapped property: price -> price
20:54:56,390 INFO HbmBinder:300 - Mapping class: domain.Address -> address
20:54:56,390 DEBUG HbmBinder:1270 - Mapped property: id -> address_id
20:54:56,390 DEBUG HbmBinder:1270 - Mapped property: street -> street
20:54:56,390 DEBUG HbmBinder:1270 - Mapped property: city -> city
20:54:56,390 DEBUG HbmBinder:1270 - Mapped property: state -> state
20:54:56,390 DEBUG HbmBinder:1270 - Mapped property: country -> country
20:54:56,390 DEBUG HbmBinder:1270 - Mapped property: zip -> zip
Code between sessionFactory.openSession() and session.close():
Criteria crit = ((((session.createCriteria(Property.class)
.add(Restrictions.between("price", minPrice, maxPrice)))
.createCriteria("office")
.add(Restrictions.eq("id", officeId)))
.createCriteria("address")
.add(Restrictions.like("city", "%" + city +"%")))
.createCriteria("style")
.add(Restrictions.like("id", "%" + styleId +"%")));
Full stack trace of any exception that occurs:
could not resolve property: address of: domain.Office
Name and version of the database you are using:
MySQL
The generated SQL (show_sql=true):
SELECT *
FROM
property p
LEFT JOIN office o ON o.office_id = p.office_id
LEFT JOIN address a ON a.address_id = p.address_id
LEFT JOIN type t ON t.type_id = p.type_id
WHERE p.price > 0 AND p.price <= 99999999
AND o.office_id = 1
AND a.city = ‘NY’
AND t.type_id = 1
Debug level Hibernate log excerpt:
|