i get the following exception :
Error in named query: getZonePanelItems
org.hibernate.QueryException: illegal attempt to dereference collection [vecltypzon1_.PK_VECLTYP_ZONE_PANEL.panelItems] with element property reference [lookup] [
from com.manheim.icheck.domain.Lookup lu,com.manheim.icheck.domain.VecltypZonePanel vzp where
lu.pkLookup in vzp.panelItems.lookup and
vzp.vehicleType.pkVehicleType = :vehTypeId and
vzp.lookupByFkZoneKey.pkLookup = :zoneId and
vzp.lookupByFkPanelKey.pkLookup = :panelId
]
when i try to execute the following query:
<query name="getZonePanelItems"><![CDATA[
from Lookup lu,VecltypZonePanel vzp where
lu.pkLookup in vzp.panelItems.lookup and
vzp.vehicleType.pkVehicleType = :vehTypeId and
vzp.lookupByFkZoneKey.pkLookup = :zoneId and
vzp.lookupByFkPanelKey.pkLookup = :panelId
]]></query>
panelItems is a set inside VecltypZonePanel table
Please help is resolving the error. I am using hibernate 3.
|