-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 
Author Message
 Post subject: one query but multiple selects!?
PostPosted: Thu Aug 11, 2005 8:04 am 
Newbie

Joined: Thu Aug 11, 2005 7:43 am
Posts: 5
hello
i have following hibernate problem in an application,
which i must support, but which i have not implemented:
following query

<query name="com.xcelso.hc.dao.InquiryFinder.findPendingInquirySummariesForMake">
<![CDATA[
select
new com.xcelso.hc.dto.InquirySummary(
inq.id,
inq.subject,
inq.customerComplaint.isBreakDown,
inq.isReleaseAggregateInquiry,
inq.isTechnicalInquiry,
inq.isCompulsoryRegistration,
inq.workshopClarification.affectedAssemblyGroup,
inq.expectedReplyDate,
vehicle.amagNumber,
vehicle.chassisNumber,
inq.owner,
inq.initialInquiryState,
inq.currentInquiryState
)
from
com.xcelso.hc.dto.Inquiry as inq,
com.xcelso.hc.dto.Vehicle as vehicle
where
inq.vehicleInfo.vehicle = vehicle
and
inq.owner.make = :make
and
inq.currentInquiryState.state.class <> com.xcelso.hc.dto.ClosedNotToPublish
and
inq.currentInquiryState.state.class <> com.xcelso.hc.dto.ClosedToPublish
]]>
</query>

does produce following output

Hibernate: select partnermak5_.PARTNER_MAKE_ID as PARTNER_1_0_, inquirysta6_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_2_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_0_, partnermak5_.DEALER_NUMBER as DEALER_N4_0_, partnermak5_.MAKE_ID as MAKE_ID0_, partnermak5_.PARTNER_ID as PARTNER_ID0_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_0_, inquirysta6_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta6_.USER_ID as USER_ID1_, inquirysta6_.INQUIRY_ID as INQUIRY_ID1_, inquirysta6_.STATE_ID as STATE_ID1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta2_.USER_ID as USER_ID2_, inquirysta2_.INQUIRY_ID as INQUIRY_ID2_, inquirysta2_.STATE_ID as STATE_ID2_, inquiry0_.INQUIRY_ID as x0_0_, inquiry0_.SUBJECT as x1_0_, inquiry0_.IS_BREAK_DOWN as x2_0_, inquiry0_.IS_RELEASE_AGGREGATE as x3_0_, inquiry0_.IS_TECHNICAL_INQ as x4_0_, inquiry0_.IS_COMPULSORY_REG as x5_0_, inquiry0_.ASSEMBLY_GROUP as x6_0_, inquiry0_.EXP_REPLY_DATE as x7_0_, vehicle1_.AMAG_NUMBER as x8_0_, vehicle1_.CHASSIS_NUMBER as x9_0_, partnermak5_.PARTNER_MAKE_ID as x10_0_, inquirysta6_.INQUIRY_STATE_ID as x11_0_, inquirysta2_.INQUIRY_STATE_ID as x12_0_ from I_INQUIRY inquiry0_, I_VEHICLE vehicle1_, I_INQUIRY_STATE inquirysta2_, I_STATE state3_, P_PARTNER_MAKE partnermak5_, I_INQUIRY_STATE inquirysta6_ where inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID and inquiry0_.INITIAL_INQ_STATE=inquirysta6_.INQUIRY_STATE_ID and inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID and ((inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID )and(state3_.STATE_DISCRIMINATOR<>'CLOSED_NOT_TO_PUBLISH' and inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID and inquirysta2_.STATE_ID=state3_.STATE_ID)and(state3_.STATE_DISCRIMINATOR<>'CLOSED_TO_PUBLISH' and inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID and inquirysta2_.STATE_ID=state3_.STATE_ID)and(inquiry0_.PARTNER_MAKE_ID in(select partnermak4_.PARTNER_MAKE_ID from P_PARTNER_MAKE partnermak4_ where (partnermak4_.SERVICE_AREA_ID=? ))))
Hibernate: select make0_.MAKE_ID as MAKE_ID0_, make0_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, make0_.TIME_OF_CREATION as TIME_OF_3_0_, make0_.CODE as CODE0_, make0_.SHORT_DESC as SHORT_DESC0_, make0_.DESCRIPTION as DESCRIPT6_0_, make0_.MAILBOX as MAILBOX0_, make0_.SUPPORT_APP as SUPPORT_8_0_, make0_.SUPPORT_LITERATURE as SUPPORT_9_0_, make0_.ESCALATION_TIME_SPAN as ESCALAT10_0_ from D_MAKE make0_ where make0_.MAKE_ID=?
Hibernate: select partner0_.PARTNER_ID as PARTNER_ID0_, partner0_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, partner0_.TIME_OF_CREATION as TIME_OF_3_0_, partner0_.NAME as NAME0_, partner0_.ZIP as ZIP0_, partner0_.LOCATION as LOCATION0_, partner0_.DEFAULT_LANG as DEFAULT_7_0_ from P_PARTNER partner0_ where partner0_.PARTNER_ID=?
Hibernate: select serviceare0_.SERVICE_AREA_ID as SERVICE_1_2_, serviceare0_.TIME_OF_LAST_UPDATE as TIME_OF_2_2_, serviceare0_.TIME_OF_CREATION as TIME_OF_3_2_, serviceare0_.SHORT_DESC as SHORT_DESC2_, serviceare0_.NAME as NAME2_, serviceare0_.ADVISOR_GROUP_ID as ADVISOR_6_2_, serviceare0_.MAKE_ID as MAKE_ID2_, productadv1_.ADVISOR_GROUP_ID as ADVISOR_1_0_, productadv1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, productadv1_.TIME_OF_CREATION as TIME_OF_3_0_, productadv1_.SHORT_DESC as SHORT_DESC0_, productadv1_.NAME as NAME0_, productadv1_.ESCALATION_TIME_SPAN as ESCALATI6_0_, make2_.MAKE_ID as MAKE_ID1_, make2_.TIME_OF_LAST_UPDATE as TIME_OF_2_1_, make2_.TIME_OF_CREATION as TIME_OF_3_1_, make2_.CODE as CODE1_, make2_.SHORT_DESC as SHORT_DESC1_, make2_.DESCRIPTION as DESCRIPT6_1_, make2_.MAILBOX as MAILBOX1_, make2_.SUPPORT_APP as SUPPORT_8_1_, make2_.SUPPORT_LITERATURE as SUPPORT_9_1_, make2_.ESCALATION_TIME_SPAN as ESCALAT10_1_ from P_SERVICE_AREA serviceare0_ left outer join A_ADVISOR_GROUP productadv1_ on serviceare0_.ADVISOR_GROUP_ID=productadv1_.ADVISOR_GROUP_ID left outer join D_MAKE make2_ on serviceare0_.MAKE_ID=make2_.MAKE_ID where serviceare0_.SERVICE_AREA_ID=?
Hibernate: select user0_.USER_ID as USER_ID0_, user0_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, user0_.[PASSWORD] as y3_0_, user0_.EMAIL as EMAIL0_, user0_.PHONE as PHONE0_, user0_.TIME_OF_CREATION as TIME_OF_6_0_, user0_.FIRST_NAME as FIRST_NAME0_, user0_.[INITIAL] as y8_0_, user0_.LAST_NAME as LAST_NAME0_, user0_.LANGUAGE as LANGUAGE0_, user0_.IS_ACTIVE as IS_ACTIVE0_ from U_USER user0_ where user0_.USER_ID=?
Hibernate: select inquiry0_.INQUIRY_ID as INQUIRY_ID8_, inquiry0_.TIME_OF_LAST_UPDATE as TIME_OF_2_8_, inquiry0_.TIME_OF_CREATION as TIME_OF_3_8_, inquiry0_.SUBJECT as SUBJECT8_, inquiry0_.LANGUAGE as LANGUAGE8_, inquiry0_.INQUIRER_NAME as INQUIRER6_8_, inquiry0_.INQUIRER_PHONE as INQUIRER7_8_, inquiry0_.INQUIRER_MAIL as INQUIRER8_8_, inquiry0_.IS_RELEASE_AGGREGATE as IS_RELEA9_8_, inquiry0_.IS_TECHNICAL_INQ as IS_TECH10_8_, inquiry0_.IS_COMPULSORY_REG as IS_COMP11_8_, inquiry0_.EXP_REPLY_DATE as EXP_REP12_8_, inquiry0_.MILEAGE as MILEAGE8_, inquiry0_.IS_VEHICLE_TUNED as IS_VEHI14_8_, inquiry0_.IS_ABT_BY_AMAG as IS_ABT_15_8_, inquiry0_.TUNER_DESC as TUNER_DESC8_, inquiry0_.TUNED_PARTS as TUNED_P17_8_, inquiry0_.VEHICLE_ID as VEHICLE_ID8_, inquiry0_.CUSTOMER_NAME as CUSTOME19_8_, inquiry0_.SERVICE_REP_NAME as SERVICE20_8_, inquiry0_.CUST_COMPLAINT as CUST_CO21_8_, inquiry0_.NUM_PRIOR_REPAIRS as NUM_PRI22_8_, inquiry0_.SINCE_WHEN_DESC as SINCE_W23_8_, inquiry0_.OCCURANCE_DATE as OCCURAN24_8_, inquiry0_.IS_REPEATING as IS_REPE25_8_, inquiry0_.IS_BREAK_DOWN as IS_BREA26_8_, inquiry0_.TEST_DRIVE as TEST_DRIVE8_, inquiry0_.COMPARISION_DRIVE as COMPARI28_8_, inquiry0_.IS_COMPREHENSIBLE as IS_COMP29_8_, inquiry0_.GUIDED_DIAGNOSTICS as GUIDED_30_8_, inquiry0_.DIAGNOSTICS_SENT as DIAGNOS31_8_, inquiry0_.WORKSHOP_COMPLAINT as WORKSHO32_8_, inquiry0_.ASSEMBLY_GROUP as ASSEMBL33_8_, inquiry0_.REPAIR_STEPS as REPAIR_34_8_, inquiry0_.HAS_TECH_LITERATURE as HAS_TEC35_8_, inquiry0_.TECH_LITERATURE as TECH_LI36_8_, inquiry0_.HAS_INFO_LITERATURE as HAS_INF37_8_, inquiry0_.WORKSHOP_QUESTION as WORKSHO38_8_, inquiry0_.CURRENT_INQ_STATE as CURRENT39_8_, inquiry0_.INITIAL_INQ_STATE as INITIAL40_8_, inquiry0_.CO_AUTHOR as CO_AUTHOR8_, inquiry0_.PARTNER_MAKE_ID as PARTNER42_8_, inquiry0_.TYPE_ID as TYPE_ID8_, inquiry0_.FORWARDED_PARTNER_MAKE_ID as FORWARD44_8_, inquiry0_.FORWARDED_TYPE_ID as FORWARD45_8_, inquiry0_.FORWARDED_TO_OTHERS as FORWARD46_8_, inquiry0_.IS_RELEASED as IS_RELE47_8_, vehicle1_.VEHICLE_ID as VEHICLE_ID0_, vehicle1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, vehicle1_.TIME_OF_CREATION as TIME_OF_3_0_, vehicle1_.AMAG_NUMBER as AMAG_NUM4_0_, vehicle1_.CHASSIS_NUMBER as CHASSIS_5_0_, vehicle1_.TYPE_CODE as TYPE_CODE0_, vehicle1_.ENGINE_TYPE as ENGINE_T7_0_, vehicle1_.ENGINE_NUMBER as ENGINE_N8_0_, vehicle1_.GEARBOX_TYPE as GEARBOX_9_0_, vehicle1_.GEARBOX_NUMBER as GEARBOX10_0_, vehicle1_.DELIVERY_DATE as DELIVER11_0_, vehicle1_.DELIVER_AGENCY as DELIVER12_0_, vehicle1_.MAKE_ID as MAKE_ID0_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta2_.USER_ID as USER_ID1_, inquirysta2_.INQUIRY_ID as INQUIRY_ID1_, inquirysta2_.STATE_ID as STATE_ID1_, inquirysta3_.INQUIRY_STATE_ID as INQUIRY_1_2_, inquirysta3_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta3_.USER_ID as USER_ID2_, inquirysta3_.INQUIRY_ID as INQUIRY_ID2_, inquirysta3_.STATE_ID as STATE_ID2_, user4_.USER_ID as USER_ID3_, user4_.TIME_OF_LAST_UPDATE as TIME_OF_2_3_, user4_.[PASSWORD] as y3_3_, user4_.EMAIL as EMAIL3_, user4_.PHONE as PHONE3_, user4_.TIME_OF_CREATION as TIME_OF_6_3_, user4_.FIRST_NAME as FIRST_NAME3_, user4_.[INITIAL] as y8_3_, user4_.LAST_NAME as LAST_NAME3_, user4_.LANGUAGE as LANGUAGE3_, user4_.IS_ACTIVE as IS_ACTIVE3_, partnermak5_.PARTNER_MAKE_ID as PARTNER_1_4_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_4_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_4_, partnermak5_.DEALER_NUMBER as DEALER_N4_4_, partnermak5_.MAKE_ID as MAKE_ID4_, partnermak5_.PARTNER_ID as PARTNER_ID4_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_4_, type6_.TYPE_ID as TYPE_ID5_, type6_.PARTNER_ROLE_TYPE as PARTNER_2_5_, partnermak7_.PARTNER_MAKE_ID as PARTNER_1_6_, partnermak7_.TIME_OF_LAST_UPDATE as TIME_OF_2_6_, partnermak7_.TIME_OF_CREATION as TIME_OF_3_6_, partnermak7_.DEALER_NUMBER as DEALER_N4_6_, partnermak7_.MAKE_ID as MAKE_ID6_, partnermak7_.PARTNER_ID as PARTNER_ID6_, partnermak7_.SERVICE_AREA_ID as SERVICE_7_6_, type8_.TYPE_ID as TYPE_ID7_, type8_.PARTNER_ROLE_TYPE as PARTNER_2_7_ from I_INQUIRY inquiry0_ left outer join I_VEHICLE vehicle1_ on inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID left outer join I_INQUIRY_STATE inquirysta2_ on inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID left outer join I_INQUIRY_STATE inquirysta3_ on inquiry0_.INITIAL_INQ_STATE=inquirysta3_.INQUIRY_STATE_ID left outer join U_USER user4_ on inquiry0_.CO_AUTHOR=user4_.USER_ID left outer join P_PARTNER_MAKE partnermak5_ on inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID left outer join P_TYPE type6_ on inquiry0_.TYPE_ID=type6_.TYPE_ID left outer join P_PARTNER_MAKE partnermak7_ on inquiry0_.FORWARDED_PARTNER_MAKE_ID=partnermak7_.PARTNER_MAKE_ID left outer join P_TYPE type8_ on inquiry0_.FORWARDED_TYPE_ID=type8_.TYPE_ID where inquiry0_.INQUIRY_ID=?
Hibernate: select state0_.STATE_ID as STATE_ID0_, state0_.STATE_DISCRIMINATOR as STATE_DI2_0_ from I_STATE state0_ where state0_.STATE_ID=?
Hibernate: select inquiry0_.INQUIRY_ID as INQUIRY_ID8_, inquiry0_.TIME_OF_LAST_UPDATE as TIME_OF_2_8_, inquiry0_.TIME_OF_CREATION as TIME_OF_3_8_, inquiry0_.SUBJECT as SUBJECT8_, inquiry0_.LANGUAGE as LANGUAGE8_, inquiry0_.INQUIRER_NAME as INQUIRER6_8_, inquiry0_.INQUIRER_PHONE as INQUIRER7_8_, inquiry0_.INQUIRER_MAIL as INQUIRER8_8_, inquiry0_.IS_RELEASE_AGGREGATE as IS_RELEA9_8_, inquiry0_.IS_TECHNICAL_INQ as IS_TECH10_8_, inquiry0_.IS_COMPULSORY_REG as IS_COMP11_8_, inquiry0_.EXP_REPLY_DATE as EXP_REP12_8_, inquiry0_.MILEAGE as MILEAGE8_, inquiry0_.IS_VEHICLE_TUNED as IS_VEHI14_8_, inquiry0_.IS_ABT_BY_AMAG as IS_ABT_15_8_, inquiry0_.TUNER_DESC as TUNER_DESC8_, inquiry0_.TUNED_PARTS as TUNED_P17_8_, inquiry0_.VEHICLE_ID as VEHICLE_ID8_, inquiry0_.CUSTOMER_NAME as CUSTOME19_8_, inquiry0_.SERVICE_REP_NAME as SERVICE20_8_, inquiry0_.CUST_COMPLAINT as CUST_CO21_8_, inquiry0_.NUM_PRIOR_REPAIRS as NUM_PRI22_8_, inquiry0_.SINCE_WHEN_DESC as SINCE_W23_8_, inquiry0_.OCCURANCE_DATE as OCCURAN24_8_, inquiry0_.IS_REPEATING as IS_REPE25_8_, inquiry0_.IS_BREAK_DOWN as IS_BREA26_8_, inquiry0_.TEST_DRIVE as TEST_DRIVE8_, inquiry0_.COMPARISION_DRIVE as COMPARI28_8_, inquiry0_.IS_COMPREHENSIBLE as IS_COMP29_8_, inquiry0_.GUIDED_DIAGNOSTICS as GUIDED_30_8_, inquiry0_.DIAGNOSTICS_SENT as DIAGNOS31_8_, inquiry0_.WORKSHOP_COMPLAINT as WORKSHO32_8_, inquiry0_.ASSEMBLY_GROUP as ASSEMBL33_8_, inquiry0_.REPAIR_STEPS as REPAIR_34_8_, inquiry0_.HAS_TECH_LITERATURE as HAS_TEC35_8_, inquiry0_.TECH_LITERATURE as TECH_LI36_8_, inquiry0_.HAS_INFO_LITERATURE as HAS_INF37_8_, inquiry0_.WORKSHOP_QUESTION as WORKSHO38_8_, inquiry0_.CURRENT_INQ_STATE as CURRENT39_8_, inquiry0_.INITIAL_INQ_STATE as INITIAL40_8_, inquiry0_.CO_AUTHOR as CO_AUTHOR8_, inquiry0_.PARTNER_MAKE_ID as PARTNER42_8_, inquiry0_.TYPE_ID as TYPE_ID8_, inquiry0_.FORWARDED_PARTNER_MAKE_ID as FORWARD44_8_, inquiry0_.FORWARDED_TYPE_ID as FORWARD45_8_, inquiry0_.FORWARDED_TO_OTHERS as FORWARD46_8_, inquiry0_.IS_RELEASED as IS_RELE47_8_, vehicle1_.VEHICLE_ID as VEHICLE_ID0_, vehicle1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, vehicle1_.TIME_OF_CREATION as TIME_OF_3_0_, vehicle1_.AMAG_NUMBER as AMAG_NUM4_0_, vehicle1_.CHASSIS_NUMBER as CHASSIS_5_0_, vehicle1_.TYPE_CODE as TYPE_CODE0_, vehicle1_.ENGINE_TYPE as ENGINE_T7_0_, vehicle1_.ENGINE_NUMBER as ENGINE_N8_0_, vehicle1_.GEARBOX_TYPE as GEARBOX_9_0_, vehicle1_.GEARBOX_NUMBER as GEARBOX10_0_, vehicle1_.DELIVERY_DATE as DELIVER11_0_, vehicle1_.DELIVER_AGENCY as DELIVER12_0_, vehicle1_.MAKE_ID as MAKE_ID0_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta2_.USER_ID as USER_ID1_, inquirysta2_.INQUIRY_ID as INQUIRY_ID1_, inquirysta2_.STATE_ID as STATE_ID1_, inquirysta3_.INQUIRY_STATE_ID as INQUIRY_1_2_, inquirysta3_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta3_.USER_ID as USER_ID2_, inquirysta3_.INQUIRY_ID as INQUIRY_ID2_, inquirysta3_.STATE_ID as STATE_ID2_, user4_.USER_ID as USER_ID3_, user4_.TIME_OF_LAST_UPDATE as TIME_OF_2_3_, user4_.[PASSWORD] as y3_3_, user4_.EMAIL as EMAIL3_, user4_.PHONE as PHONE3_, user4_.TIME_OF_CREATION as TIME_OF_6_3_, user4_.FIRST_NAME as FIRST_NAME3_, user4_.[INITIAL] as y8_3_, user4_.LAST_NAME as LAST_NAME3_, user4_.LANGUAGE as LANGUAGE3_, user4_.IS_ACTIVE as IS_ACTIVE3_, partnermak5_.PARTNER_MAKE_ID as PARTNER_1_4_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_4_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_4_, partnermak5_.DEALER_NUMBER as DEALER_N4_4_, partnermak5_.MAKE_ID as MAKE_ID4_, partnermak5_.PARTNER_ID as PARTNER_ID4_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_4_, type6_.TYPE_ID as TYPE_ID5_, type6_.PARTNER_ROLE_TYPE as PARTNER_2_5_, partnermak7_.PARTNER_MAKE_ID as PARTNER_1_6_, partnermak7_.TIME_OF_LAST_UPDATE as TIME_OF_2_6_, partnermak7_.TIME_OF_CREATION as TIME_OF_3_6_, partnermak7_.DEALER_NUMBER as DEALER_N4_6_, partnermak7_.MAKE_ID as MAKE_ID6_, partnermak7_.PARTNER_ID as PARTNER_ID6_, partnermak7_.SERVICE_AREA_ID as SERVICE_7_6_, type8_.TYPE_ID as TYPE_ID7_, type8_.PARTNER_ROLE_TYPE as PARTNER_2_7_ from I_INQUIRY inquiry0_ left outer join I_VEHICLE vehicle1_ on inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID left outer join I_INQUIRY_STATE inquirysta2_ on inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID left outer join I_INQUIRY_STATE inquirysta3_ on inquiry0_.INITIAL_INQ_STATE=inquirysta3_.INQUIRY_STATE_ID left outer join U_USER user4_ on inquiry0_.CO_AUTHOR=user4_.USER_ID left outer join P_PARTNER_MAKE partnermak5_ on inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID left outer join P_TYPE type6_ on inquiry0_.TYPE_ID=type6_.TYPE_ID left outer join P_PARTNER_MAKE partnermak7_ on inquiry0_.FORWARDED_PARTNER_MAKE_ID=partnermak7_.PARTNER_MAKE_ID left outer join P_TYPE type8_ on inquiry0_.FORWARDED_TYPE_ID=type8_.TYPE_ID where inquiry0_.INQUIRY_ID=?
Hibernate: select inquiry0_.INQUIRY_ID as INQUIRY_ID8_, inquiry0_.TIME_OF_LAST_UPDATE as TIME_OF_2_8_, inquiry0_.TIME_OF_CREATION as TIME_OF_3_8_, inquiry0_.SUBJECT as SUBJECT8_, inquiry0_.LANGUAGE as LANGUAGE8_, inquiry0_.INQUIRER_NAME as INQUIRER6_8_, inquiry0_.INQUIRER_PHONE as INQUIRER7_8_, inquiry0_.INQUIRER_MAIL as INQUIRER8_8_, inquiry0_.IS_RELEASE_AGGREGATE as IS_RELEA9_8_, inquiry0_.IS_TECHNICAL_INQ as IS_TECH10_8_, inquiry0_.IS_COMPULSORY_REG as IS_COMP11_8_, inquiry0_.EXP_REPLY_DATE as EXP_REP12_8_, inquiry0_.MILEAGE as MILEAGE8_, inquiry0_.IS_VEHICLE_TUNED as IS_VEHI14_8_, inquiry0_.IS_ABT_BY_AMAG as IS_ABT_15_8_, inquiry0_.TUNER_DESC as TUNER_DESC8_, inquiry0_.TUNED_PARTS as TUNED_P17_8_, inquiry0_.VEHICLE_ID as VEHICLE_ID8_, inquiry0_.CUSTOMER_NAME as CUSTOME19_8_, inquiry0_.SERVICE_REP_NAME as SERVICE20_8_, inquiry0_.CUST_COMPLAINT as CUST_CO21_8_, inquiry0_.NUM_PRIOR_REPAIRS as NUM_PRI22_8_, inquiry0_.SINCE_WHEN_DESC as SINCE_W23_8_, inquiry0_.OCCURANCE_DATE as OCCURAN24_8_, inquiry0_.IS_REPEATING as IS_REPE25_8_, inquiry0_.IS_BREAK_DOWN as IS_BREA26_8_, inquiry0_.TEST_DRIVE as TEST_DRIVE8_, inquiry0_.COMPARISION_DRIVE as COMPARI28_8_, inquiry0_.IS_COMPREHENSIBLE as IS_COMP29_8_, inquiry0_.GUIDED_DIAGNOSTICS as GUIDED_30_8_, inquiry0_.DIAGNOSTICS_SENT as DIAGNOS31_8_, inquiry0_.WORKSHOP_COMPLAINT as WORKSHO32_8_, inquiry0_.ASSEMBLY_GROUP as ASSEMBL33_8_, inquiry0_.REPAIR_STEPS as REPAIR_34_8_, inquiry0_.HAS_TECH_LITERATURE as HAS_TEC35_8_, inquiry0_.TECH_LITERATURE as TECH_LI36_8_, inquiry0_.HAS_INFO_LITERATURE as HAS_INF37_8_, inquiry0_.WORKSHOP_QUESTION as WORKSHO38_8_, inquiry0_.CURRENT_INQ_STATE as CURRENT39_8_, inquiry0_.INITIAL_INQ_STATE as INITIAL40_8_, inquiry0_.CO_AUTHOR as CO_AUTHOR8_, inquiry0_.PARTNER_MAKE_ID as PARTNER42_8_, inquiry0_.TYPE_ID as TYPE_ID8_, inquiry0_.FORWARDED_PARTNER_MAKE_ID as FORWARD44_8_, inquiry0_.FORWARDED_TYPE_ID as FORWARD45_8_, inquiry0_.FORWARDED_TO_OTHERS as FORWARD46_8_, inquiry0_.IS_RELEASED as IS_RELE47_8_, vehicle1_.VEHICLE_ID as VEHICLE_ID0_, vehicle1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, vehicle1_.TIME_OF_CREATION as TIME_OF_3_0_, vehicle1_.AMAG_NUMBER as AMAG_NUM4_0_, vehicle1_.CHASSIS_NUMBER as CHASSIS_5_0_, vehicle1_.TYPE_CODE as TYPE_CODE0_, vehicle1_.ENGINE_TYPE as ENGINE_T7_0_, vehicle1_.ENGINE_NUMBER as ENGINE_N8_0_, vehicle1_.GEARBOX_TYPE as GEARBOX_9_0_, vehicle1_.GEARBOX_NUMBER as GEARBOX10_0_, vehicle1_.DELIVERY_DATE as DELIVER11_0_, vehicle1_.DELIVER_AGENCY as DELIVER12_0_, vehicle1_.MAKE_ID as MAKE_ID0_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta2_.USER_ID as USER_ID1_, inquirysta2_.INQUIRY_ID as INQUIRY_ID1_, inquirysta2_.STATE_ID as STATE_ID1_, inquirysta3_.INQUIRY_STATE_ID as INQUIRY_1_2_, inquirysta3_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta3_.USER_ID as USER_ID2_, inquirysta3_.INQUIRY_ID as INQUIRY_ID2_, inquirysta3_.STATE_ID as STATE_ID2_, user4_.USER_ID as USER_ID3_, user4_.TIME_OF_LAST_UPDATE as TIME_OF_2_3_, user4_.[PASSWORD] as y3_3_, user4_.EMAIL as EMAIL3_, user4_.PHONE as PHONE3_, user4_.TIME_OF_CREATION as TIME_OF_6_3_, user4_.FIRST_NAME as FIRST_NAME3_, user4_.[INITIAL] as y8_3_, user4_.LAST_NAME as LAST_NAME3_, user4_.LANGUAGE as LANGUAGE3_, user4_.IS_ACTIVE as IS_ACTIVE3_, partnermak5_.PARTNER_MAKE_ID as PARTNER_1_4_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_4_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_4_, partnermak5_.DEALER_NUMBER as DEALER_N4_4_, partnermak5_.MAKE_ID as MAKE_ID4_, partnermak5_.PARTNER_ID as PARTNER_ID4_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_4_, type6_.TYPE_ID as TYPE_ID5_, type6_.PARTNER_ROLE_TYPE as PARTNER_2_5_, partnermak7_.PARTNER_MAKE_ID as PARTNER_1_6_, partnermak7_.TIME_OF_LAST_UPDATE as TIME_OF_2_6_, partnermak7_.TIME_OF_CREATION as TIME_OF_3_6_, partnermak7_.DEALER_NUMBER as DEALER_N4_6_, partnermak7_.MAKE_ID as MAKE_ID6_, partnermak7_.PARTNER_ID as PARTNER_ID6_, partnermak7_.SERVICE_AREA_ID as SERVICE_7_6_, type8_.TYPE_ID as TYPE_ID7_, type8_.PARTNER_ROLE_TYPE as PARTNER_2_7_ from I_INQUIRY inquiry0_ left outer join I_VEHICLE vehicle1_ on inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID left outer join I_INQUIRY_STATE inquirysta2_ on inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID left outer join I_INQUIRY_STATE inquirysta3_ on inquiry0_.INITIAL_INQ_STATE=inquirysta3_.INQUIRY_STATE_ID left outer join U_USER user4_ on inquiry0_.CO_AUTHOR=user4_.USER_ID left outer join P_PARTNER_MAKE partnermak5_ on inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID left outer join P_TYPE type6_ on inquiry0_.TYPE_ID=type6_.TYPE_ID left outer join P_PARTNER_MAKE partnermak7_ on inquiry0_.FORWARDED_PARTNER_MAKE_ID=partnermak7_.PARTNER_MAKE_ID left outer join P_TYPE type8_ on inquiry0_.FORWARDED_TYPE_ID=type8_.TYPE_ID where inquiry0_.INQUIRY_ID=?
Hibernate: select inquiry0_.INQUIRY_ID as INQUIRY_ID8_, inquiry0_.TIME_OF_LAST_UPDATE as TIME_OF_2_8_, inquiry0_.TIME_OF_CREATION as TIME_OF_3_8_, inquiry0_.SUBJECT as SUBJECT8_, inquiry0_.LANGUAGE as LANGUAGE8_, inquiry0_.INQUIRER_NAME as INQUIRER6_8_, inquiry0_.INQUIRER_PHONE as INQUIRER7_8_, inquiry0_.INQUIRER_MAIL as INQUIRER8_8_, inquiry0_.IS_RELEASE_AGGREGATE as IS_RELEA9_8_, inquiry0_.IS_TECHNICAL_INQ as IS_TECH10_8_, inquiry0_.IS_COMPULSORY_REG as IS_COMP11_8_, inquiry0_.EXP_REPLY_DATE as EXP_REP12_8_, inquiry0_.MILEAGE as MILEAGE8_, inquiry0_.IS_VEHICLE_TUNED as IS_VEHI14_8_, inquiry0_.IS_ABT_BY_AMAG as IS_ABT_15_8_, inquiry0_.TUNER_DESC as TUNER_DESC8_, inquiry0_.TUNED_PARTS as TUNED_P17_8_, inquiry0_.VEHICLE_ID as VEHICLE_ID8_, inquiry0_.CUSTOMER_NAME as CUSTOME19_8_, inquiry0_.SERVICE_REP_NAME as SERVICE20_8_, inquiry0_.CUST_COMPLAINT as CUST_CO21_8_, inquiry0_.NUM_PRIOR_REPAIRS as NUM_PRI22_8_, inquiry0_.SINCE_WHEN_DESC as SINCE_W23_8_, inquiry0_.OCCURANCE_DATE as OCCURAN24_8_, inquiry0_.IS_REPEATING as IS_REPE25_8_, inquiry0_.IS_BREAK_DOWN as IS_BREA26_8_, inquiry0_.TEST_DRIVE as TEST_DRIVE8_, inquiry0_.COMPARISION_DRIVE as COMPARI28_8_, inquiry0_.IS_COMPREHENSIBLE as IS_COMP29_8_, inquiry0_.GUIDED_DIAGNOSTICS as GUIDED_30_8_, inquiry0_.DIAGNOSTICS_SENT as DIAGNOS31_8_, inquiry0_.WORKSHOP_COMPLAINT as WORKSHO32_8_, inquiry0_.ASSEMBLY_GROUP as ASSEMBL33_8_, inquiry0_.REPAIR_STEPS as REPAIR_34_8_, inquiry0_.HAS_TECH_LITERATURE as HAS_TEC35_8_, inquiry0_.TECH_LITERATURE as TECH_LI36_8_, inquiry0_.HAS_INFO_LITERATURE as HAS_INF37_8_, inquiry0_.WORKSHOP_QUESTION as WORKSHO38_8_, inquiry0_.CURRENT_INQ_STATE as CURRENT39_8_, inquiry0_.INITIAL_INQ_STATE as INITIAL40_8_, inquiry0_.CO_AUTHOR as CO_AUTHOR8_, inquiry0_.PARTNER_MAKE_ID as PARTNER42_8_, inquiry0_.TYPE_ID as TYPE_ID8_, inquiry0_.FORWARDED_PARTNER_MAKE_ID as FORWARD44_8_, inquiry0_.FORWARDED_TYPE_ID as FORWARD45_8_, inquiry0_.FORWARDED_TO_OTHERS as FORWARD46_8_, inquiry0_.IS_RELEASED as IS_RELE47_8_, vehicle1_.VEHICLE_ID as VEHICLE_ID0_, vehicle1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, vehicle1_.TIME_OF_CREATION as TIME_OF_3_0_, vehicle1_.AMAG_NUMBER as AMAG_NUM4_0_, vehicle1_.CHASSIS_NUMBER as CHASSIS_5_0_, vehicle1_.TYPE_CODE as TYPE_CODE0_, vehicle1_.ENGINE_TYPE as ENGINE_T7_0_, vehicle1_.ENGINE_NUMBER as ENGINE_N8_0_, vehicle1_.GEARBOX_TYPE as GEARBOX_9_0_, vehicle1_.GEARBOX_NUMBER as GEARBOX10_0_, vehicle1_.DELIVERY_DATE as DELIVER11_0_, vehicle1_.DELIVER_AGENCY as DELIVER12_0_, vehicle1_.MAKE_ID as MAKE_ID0_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta2_.USER_ID as USER_ID1_, inquirysta2_.INQUIRY_ID as INQUIRY_ID1_, inquirysta2_.STATE_ID as STATE_ID1_, inquirysta3_.INQUIRY_STATE_ID as INQUIRY_1_2_, inquirysta3_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta3_.USER_ID as USER_ID2_, inquirysta3_.INQUIRY_ID as INQUIRY_ID2_, inquirysta3_.STATE_ID as STATE_ID2_, user4_.USER_ID as USER_ID3_, user4_.TIME_OF_LAST_UPDATE as TIME_OF_2_3_, user4_.[PASSWORD] as y3_3_, user4_.EMAIL as EMAIL3_, user4_.PHONE as PHONE3_, user4_.TIME_OF_CREATION as TIME_OF_6_3_, user4_.FIRST_NAME as FIRST_NAME3_, user4_.[INITIAL] as y8_3_, user4_.LAST_NAME as LAST_NAME3_, user4_.LANGUAGE as LANGUAGE3_, user4_.IS_ACTIVE as IS_ACTIVE3_, partnermak5_.PARTNER_MAKE_ID as PARTNER_1_4_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_4_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_4_, partnermak5_.DEALER_NUMBER as DEALER_N4_4_, partnermak5_.MAKE_ID as MAKE_ID4_, partnermak5_.PARTNER_ID as PARTNER_ID4_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_4_, type6_.TYPE_ID as TYPE_ID5_, type6_.PARTNER_ROLE_TYPE as PARTNER_2_5_, partnermak7_.PARTNER_MAKE_ID as PARTNER_1_6_, partnermak7_.TIME_OF_LAST_UPDATE as TIME_OF_2_6_, partnermak7_.TIME_OF_CREATION as TIME_OF_3_6_, partnermak7_.DEALER_NUMBER as DEALER_N4_6_, partnermak7_.MAKE_ID as MAKE_ID6_, partnermak7_.PARTNER_ID as PARTNER_ID6_, partnermak7_.SERVICE_AREA_ID as SERVICE_7_6_, type8_.TYPE_ID as TYPE_ID7_, type8_.PARTNER_ROLE_TYPE as PARTNER_2_7_ from I_INQUIRY inquiry0_ left outer join I_VEHICLE vehicle1_ on inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID left outer join I_INQUIRY_STATE inquirysta2_ on inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID left outer join I_INQUIRY_STATE inquirysta3_ on inquiry0_.INITIAL_INQ_STATE=inquirysta3_.INQUIRY_STATE_ID left outer join U_USER user4_ on inquiry0_.CO_AUTHOR=user4_.USER_ID left outer join P_PARTNER_MAKE partnermak5_ on inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID left outer join P_TYPE type6_ on inquiry0_.TYPE_ID=type6_.TYPE_ID left outer join P_PARTNER_MAKE partnermak7_ on inquiry0_.FORWARDED_PARTNER_MAKE_ID=partnermak7_.PARTNER_MAKE_ID left outer join P_TYPE type8_ on inquiry0_.FORWARDED_TYPE_ID=type8_.TYPE_ID where inquiry0_.INQUIRY_ID=?
Hibernate: select inquiry0_.INQUIRY_ID as INQUIRY_ID8_, inquiry0_.TIME_OF_LAST_UPDATE as TIME_OF_2_8_, inquiry0_.TIME_OF_CREATION as TIME_OF_3_8_, inquiry0_.SUBJECT as SUBJECT8_, inquiry0_.LANGUAGE as LANGUAGE8_, inquiry0_.INQUIRER_NAME as INQUIRER6_8_, inquiry0_.INQUIRER_PHONE as INQUIRER7_8_, inquiry0_.INQUIRER_MAIL as INQUIRER8_8_, inquiry0_.IS_RELEASE_AGGREGATE as IS_RELEA9_8_, inquiry0_.IS_TECHNICAL_INQ as IS_TECH10_8_, inquiry0_.IS_COMPULSORY_REG as IS_COMP11_8_, inquiry0_.EXP_REPLY_DATE as EXP_REP12_8_, inquiry0_.MILEAGE as MILEAGE8_, inquiry0_.IS_VEHICLE_TUNED as IS_VEHI14_8_, inquiry0_.IS_ABT_BY_AMAG as IS_ABT_15_8_, inquiry0_.TUNER_DESC as TUNER_DESC8_, inquiry0_.TUNED_PARTS as TUNED_P17_8_, inquiry0_.VEHICLE_ID as VEHICLE_ID8_, inquiry0_.CUSTOMER_NAME as CUSTOME19_8_, inquiry0_.SERVICE_REP_NAME as SERVICE20_8_, inquiry0_.CUST_COMPLAINT as CUST_CO21_8_, inquiry0_.NUM_PRIOR_REPAIRS as NUM_PRI22_8_, inquiry0_.SINCE_WHEN_DESC as SINCE_W23_8_, inquiry0_.OCCURANCE_DATE as OCCURAN24_8_, inquiry0_.IS_REPEATING as IS_REPE25_8_, inquiry0_.IS_BREAK_DOWN as IS_BREA26_8_, inquiry0_.TEST_DRIVE as TEST_DRIVE8_, inquiry0_.COMPARISION_DRIVE as COMPARI28_8_, inquiry0_.IS_COMPREHENSIBLE as IS_COMP29_8_, inquiry0_.GUIDED_DIAGNOSTICS as GUIDED_30_8_, inquiry0_.DIAGNOSTICS_SENT as DIAGNOS31_8_, inquiry0_.WORKSHOP_COMPLAINT as WORKSHO32_8_, inquiry0_.ASSEMBLY_GROUP as ASSEMBL33_8_, inquiry0_.REPAIR_STEPS as REPAIR_34_8_, inquiry0_.HAS_TECH_LITERATURE as HAS_TEC35_8_, inquiry0_.TECH_LITERATURE as TECH_LI36_8_, inquiry0_.HAS_INFO_LITERATURE as HAS_INF37_8_, inquiry0_.WORKSHOP_QUESTION as WORKSHO38_8_, inquiry0_.CURRENT_INQ_STATE as CURRENT39_8_, inquiry0_.INITIAL_INQ_STATE as INITIAL40_8_, inquiry0_.CO_AUTHOR as CO_AUTHOR8_, inquiry0_.PARTNER_MAKE_ID as PARTNER42_8_, inquiry0_.TYPE_ID as TYPE_ID8_, inquiry0_.FORWARDED_PARTNER_MAKE_ID as FORWARD44_8_, inquiry0_.FORWARDED_TYPE_ID as FORWARD45_8_, inquiry0_.FORWARDED_TO_OTHERS as FORWARD46_8_, inquiry0_.IS_RELEASED as IS_RELE47_8_, vehicle1_.VEHICLE_ID as VEHICLE_ID0_, vehicle1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, vehicle1_.TIME_OF_CREATION as TIME_OF_3_0_, vehicle1_.AMAG_NUMBER as AMAG_NUM4_0_, vehicle1_.CHASSIS_NUMBER as CHASSIS_5_0_, vehicle1_.TYPE_CODE as TYPE_CODE0_, vehicle1_.ENGINE_TYPE as ENGINE_T7_0_, vehicle1_.ENGINE_NUMBER as ENGINE_N8_0_, vehicle1_.GEARBOX_TYPE as GEARBOX_9_0_, vehicle1_.GEARBOX_NUMBER as GEARBOX10_0_, vehicle1_.DELIVERY_DATE as DELIVER11_0_, vehicle1_.DELIVER_AGENCY as DELIVER12_0_, vehicle1_.MAKE_ID as MAKE_ID0_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta2_.USER_ID as USER_ID1_, inquirysta2_.INQUIRY_ID as INQUIRY_ID1_, inquirysta2_.STATE_ID as STATE_ID1_, inquirysta3_.INQUIRY_STATE_ID as INQUIRY_1_2_, inquirysta3_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta3_.USER_ID as USER_ID2_, inquirysta3_.INQUIRY_ID as INQUIRY_ID2_, inquirysta3_.STATE_ID as STATE_ID2_, user4_.USER_ID as USER_ID3_, user4_.TIME_OF_LAST_UPDATE as TIME_OF_2_3_, user4_.[PASSWORD] as y3_3_, user4_.EMAIL as EMAIL3_, user4_.PHONE as PHONE3_, user4_.TIME_OF_CREATION as TIME_OF_6_3_, user4_.FIRST_NAME as FIRST_NAME3_, user4_.[INITIAL] as y8_3_, user4_.LAST_NAME as LAST_NAME3_, user4_.LANGUAGE as LANGUAGE3_, user4_.IS_ACTIVE as IS_ACTIVE3_, partnermak5_.PARTNER_MAKE_ID as PARTNER_1_4_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_4_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_4_, partnermak5_.DEALER_NUMBER as DEALER_N4_4_, partnermak5_.MAKE_ID as MAKE_ID4_, partnermak5_.PARTNER_ID as PARTNER_ID4_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_4_, type6_.TYPE_ID as TYPE_ID5_, type6_.PARTNER_ROLE_TYPE as PARTNER_2_5_, partnermak7_.PARTNER_MAKE_ID as PARTNER_1_6_, partnermak7_.TIME_OF_LAST_UPDATE as TIME_OF_2_6_, partnermak7_.TIME_OF_CREATION as TIME_OF_3_6_, partnermak7_.DEALER_NUMBER as DEALER_N4_6_, partnermak7_.MAKE_ID as MAKE_ID6_, partnermak7_.PARTNER_ID as PARTNER_ID6_, partnermak7_.SERVICE_AREA_ID as SERVICE_7_6_, type8_.TYPE_ID as TYPE_ID7_, type8_.PARTNER_ROLE_TYPE as PARTNER_2_7_ from I_INQUIRY inquiry0_ left outer join I_VEHICLE vehicle1_ on inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID left outer join I_INQUIRY_STATE inquirysta2_ on inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID left outer join I_INQUIRY_STATE inquirysta3_ on inquiry0_.INITIAL_INQ_STATE=inquirysta3_.INQUIRY_STATE_ID left outer join U_USER user4_ on inquiry0_.CO_AUTHOR=user4_.USER_ID left outer join P_PARTNER_MAKE partnermak5_ on inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID left outer join P_TYPE type6_ on inquiry0_.TYPE_ID=type6_.TYPE_ID left outer join P_PARTNER_MAKE partnermak7_ on inquiry0_.FORWARDED_PARTNER_MAKE_ID=partnermak7_.PARTNER_MAKE_ID left outer join P_TYPE type8_ on inquiry0_.FORWARDED_TYPE_ID=type8_.TYPE_ID where inquiry0_.INQUIRY_ID=?
Hibernate: select inquiry0_.INQUIRY_ID as INQUIRY_ID8_, inquiry0_.TIME_OF_LAST_UPDATE as TIME_OF_2_8_, inquiry0_.TIME_OF_CREATION as TIME_OF_3_8_, inquiry0_.SUBJECT as SUBJECT8_, inquiry0_.LANGUAGE as LANGUAGE8_, inquiry0_.INQUIRER_NAME as INQUIRER6_8_, inquiry0_.INQUIRER_PHONE as INQUIRER7_8_, inquiry0_.INQUIRER_MAIL as INQUIRER8_8_, inquiry0_.IS_RELEASE_AGGREGATE as IS_RELEA9_8_, inquiry0_.IS_TECHNICAL_INQ as IS_TECH10_8_, inquiry0_.IS_COMPULSORY_REG as IS_COMP11_8_, inquiry0_.EXP_REPLY_DATE as EXP_REP12_8_, inquiry0_.MILEAGE as MILEAGE8_, inquiry0_.IS_VEHICLE_TUNED as IS_VEHI14_8_, inquiry0_.IS_ABT_BY_AMAG as IS_ABT_15_8_, inquiry0_.TUNER_DESC as TUNER_DESC8_, inquiry0_.TUNED_PARTS as TUNED_P17_8_, inquiry0_.VEHICLE_ID as VEHICLE_ID8_, inquiry0_.CUSTOMER_NAME as CUSTOME19_8_, inquiry0_.SERVICE_REP_NAME as SERVICE20_8_, inquiry0_.CUST_COMPLAINT as CUST_CO21_8_, inquiry0_.NUM_PRIOR_REPAIRS as NUM_PRI22_8_, inquiry0_.SINCE_WHEN_DESC as SINCE_W23_8_, inquiry0_.OCCURANCE_DATE as OCCURAN24_8_, inquiry0_.IS_REPEATING as IS_REPE25_8_, inquiry0_.IS_BREAK_DOWN as IS_BREA26_8_, inquiry0_.TEST_DRIVE as TEST_DRIVE8_, inquiry0_.COMPARISION_DRIVE as COMPARI28_8_, inquiry0_.IS_COMPREHENSIBLE as IS_COMP29_8_, inquiry0_.GUIDED_DIAGNOSTICS as GUIDED_30_8_, inquiry0_.DIAGNOSTICS_SENT as DIAGNOS31_8_, inquiry0_.WORKSHOP_COMPLAINT as WORKSHO32_8_, inquiry0_.ASSEMBLY_GROUP as ASSEMBL33_8_, inquiry0_.REPAIR_STEPS as REPAIR_34_8_, inquiry0_.HAS_TECH_LITERATURE as HAS_TEC35_8_, inquiry0_.TECH_LITERATURE as TECH_LI36_8_, inquiry0_.HAS_INFO_LITERATURE as HAS_INF37_8_, inquiry0_.WORKSHOP_QUESTION as WORKSHO38_8_, inquiry0_.CURRENT_INQ_STATE as CURRENT39_8_, inquiry0_.INITIAL_INQ_STATE as INITIAL40_8_, inquiry0_.CO_AUTHOR as CO_AUTHOR8_, inquiry0_.PARTNER_MAKE_ID as PARTNER42_8_, inquiry0_.TYPE_ID as TYPE_ID8_, inquiry0_.FORWARDED_PARTNER_MAKE_ID as FORWARD44_8_, inquiry0_.FORWARDED_TYPE_ID as FORWARD45_8_, inquiry0_.FORWARDED_TO_OTHERS as FORWARD46_8_, inquiry0_.IS_RELEASED as IS_RELE47_8_, vehicle1_.VEHICLE_ID as VEHICLE_ID0_, vehicle1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, vehicle1_.TIME_OF_CREATION as TIME_OF_3_0_, vehicle1_.AMAG_NUMBER as AMAG_NUM4_0_, vehicle1_.CHASSIS_NUMBER as CHASSIS_5_0_, vehicle1_.TYPE_CODE as TYPE_CODE0_, vehicle1_.ENGINE_TYPE as ENGINE_T7_0_, vehicle1_.ENGINE_NUMBER as ENGINE_N8_0_, vehicle1_.GEARBOX_TYPE as GEARBOX_9_0_, vehicle1_.GEARBOX_NUMBER as GEARBOX10_0_, vehicle1_.DELIVERY_DATE as DELIVER11_0_, vehicle1_.DELIVER_AGENCY as DELIVER12_0_, vehicle1_.MAKE_ID as MAKE_ID0_, inquirysta2_.INQUIRY_STATE_ID as INQUIRY_1_1_, inquirysta2_.TIME_OF_CREATION as TIME_OF_2_1_, inquirysta2_.USER_ID as USER_ID1_, inquirysta2_.INQUIRY_ID as INQUIRY_ID1_, inquirysta2_.STATE_ID as STATE_ID1_, inquirysta3_.INQUIRY_STATE_ID as INQUIRY_1_2_, inquirysta3_.TIME_OF_CREATION as TIME_OF_2_2_, inquirysta3_.USER_ID as USER_ID2_, inquirysta3_.INQUIRY_ID as INQUIRY_ID2_, inquirysta3_.STATE_ID as STATE_ID2_, user4_.USER_ID as USER_ID3_, user4_.TIME_OF_LAST_UPDATE as TIME_OF_2_3_, user4_.[PASSWORD] as y3_3_, user4_.EMAIL as EMAIL3_, user4_.PHONE as PHONE3_, user4_.TIME_OF_CREATION as TIME_OF_6_3_, user4_.FIRST_NAME as FIRST_NAME3_, user4_.[INITIAL] as y8_3_, user4_.LAST_NAME as LAST_NAME3_, user4_.LANGUAGE as LANGUAGE3_, user4_.IS_ACTIVE as IS_ACTIVE3_, partnermak5_.PARTNER_MAKE_ID as PARTNER_1_4_, partnermak5_.TIME_OF_LAST_UPDATE as TIME_OF_2_4_, partnermak5_.TIME_OF_CREATION as TIME_OF_3_4_, partnermak5_.DEALER_NUMBER as DEALER_N4_4_, partnermak5_.MAKE_ID as MAKE_ID4_, partnermak5_.PARTNER_ID as PARTNER_ID4_, partnermak5_.SERVICE_AREA_ID as SERVICE_7_4_, type6_.TYPE_ID as TYPE_ID5_, type6_.PARTNER_ROLE_TYPE as PARTNER_2_5_, partnermak7_.PARTNER_MAKE_ID as PARTNER_1_6_, partnermak7_.TIME_OF_LAST_UPDATE as TIME_OF_2_6_, partnermak7_.TIME_OF_CREATION as TIME_OF_3_6_, partnermak7_.DEALER_NUMBER as DEALER_N4_6_, partnermak7_.MAKE_ID as MAKE_ID6_, partnermak7_.PARTNER_ID as PARTNER_ID6_, partnermak7_.SERVICE_AREA_ID as SERVICE_7_6_, type8_.TYPE_ID as TYPE_ID7_, type8_.PARTNER_ROLE_TYPE as PARTNER_2_7_ from I_INQUIRY inquiry0_ left outer join I_VEHICLE vehicle1_ on inquiry0_.VEHICLE_ID=vehicle1_.VEHICLE_ID left outer join I_INQUIRY_STATE inquirysta2_ on inquiry0_.CURRENT_INQ_STATE=inquirysta2_.INQUIRY_STATE_ID left outer join I_INQUIRY_STATE inquirysta3_ on inquiry0_.INITIAL_INQ_STATE=inquirysta3_.INQUIRY_STATE_ID left outer join U_USER user4_ on inquiry0_.CO_AUTHOR=user4_.USER_ID left outer join P_PARTNER_MAKE partnermak5_ on inquiry0_.PARTNER_MAKE_ID=partnermak5_.PARTNER_MAKE_ID left outer join P_TYPE type6_ on inquiry0_.TYPE_ID=type6_.TYPE_ID left outer join P_PARTNER_MAKE partnermak7_ on inquiry0_.FORWARDED_PARTNER_MAKE_ID=partnermak7_.PARTNER_MAKE_ID left outer join P_TYPE type8_ on inquiry0_.FORWARDED_TYPE_ID=type8_.TYPE_ID where inquiry0_.INQUIRY_ID=?
Hibernate: select partnermak0_.PARTNER_MAKE_ID as PARTNER_1___, partnermak0_.PARTNER_ID as PARTNER_ID__, partnermak0_.PARTNER_MAKE_ID as PARTNER_1_2_, partnermak0_.TIME_OF_LAST_UPDATE as TIME_OF_2_2_, partnermak0_.TIME_OF_CREATION as TIME_OF_3_2_, partnermak0_.DEALER_NUMBER as DEALER_N4_2_, partnermak0_.MAKE_ID as MAKE_ID2_, partnermak0_.PARTNER_ID as PARTNER_ID2_, partnermak0_.SERVICE_AREA_ID as SERVICE_7_2_, make1_.MAKE_ID as MAKE_ID0_, make1_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, make1_.TIME_OF_CREATION as TIME_OF_3_0_, make1_.CODE as CODE0_, make1_.SHORT_DESC as SHORT_DESC0_, make1_.DESCRIPTION as DESCRIPT6_0_, make1_.MAILBOX as MAILBOX0_, make1_.SUPPORT_APP as SUPPORT_8_0_, make1_.SUPPORT_LITERATURE as SUPPORT_9_0_, make1_.ESCALATION_TIME_SPAN as ESCALAT10_0_, serviceare2_.SERVICE_AREA_ID as SERVICE_1_1_, serviceare2_.TIME_OF_LAST_UPDATE as TIME_OF_2_1_, serviceare2_.TIME_OF_CREATION as TIME_OF_3_1_, serviceare2_.SHORT_DESC as SHORT_DESC1_, serviceare2_.NAME as NAME1_, serviceare2_.ADVISOR_GROUP_ID as ADVISOR_6_1_, serviceare2_.MAKE_ID as MAKE_ID1_ from P_PARTNER_MAKE partnermak0_ left outer join D_MAKE make1_ on partnermak0_.MAKE_ID=make1_.MAKE_ID left outer join P_SERVICE_AREA serviceare2_ on partnermak0_.SERVICE_AREA_ID=serviceare2_.SERVICE_AREA_ID where partnermak0_.PARTNER_ID=?
Hibernate: select productadv0_.ADVISOR_GROUP_ID as ADVISOR_1_0_, productadv0_.TIME_OF_LAST_UPDATE as TIME_OF_2_0_, productadv0_.TIME_OF_CREATION as TIME_OF_3_0_, productadv0_.SHORT_DESC as SHORT_DESC0_, productadv0_.NAME as NAME0_, productadv0_.ESCALATION_TIME_SPAN as ESCALATI6_0_ from A_ADVISOR_GROUP productadv0_ where productadv0_.ADVISOR_GROUP_ID=?

that means, that these query submits multiple select statements!?
as more items are in the list, as more selects are generated ...
why? has somebody an idea?
a native sql query would return the information via one select!
thanks for your help!
with kind regards!


Top
 Profile  
 
 Post subject: Re: one query but multiple selects!?
PostPosted: Thu Aug 11, 2005 9:08 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
How would you write the native query ? You should be able modify this HQL query to use joins.

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 12:08 pm 
Newbie

Joined: Thu Aug 11, 2005 7:43 am
Posts: 5
hello
thanks for your answer!
a native query like

SELECT Employees.Name, Orders.Product
FROM Employees, Orders
WHERE Employees.Employee_ID=Orders.Employee_ID

would generate one db access and
would return one result set.
why does hibernate not the same?
why does hibernate generate multiple db access? performance ...
is the query not well implemented? (you mentioned joins!?)
or is there somewhere an option to set?
thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 12:19 pm 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
With joins you can write
Code:
SELECT ...
FROM Inquiry inq join inq.vehicleInfo vehicleInfo join vehicleInfo.vehicle vehicle join inq.currentInquiryState currentState
WHERE ...

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 11, 2005 1:32 pm 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
hibernatebenutzer wrote:
hello
thanks for your answer!
a native query like

SELECT Employees.Name, Orders.Product
FROM Employees, Orders
WHERE Employees.Employee_ID=Orders.Employee_ID

would generate one db access and
would return one result set.
why does hibernate not the same?
why does hibernate generate multiple db access? performance ...
is the query not well implemented? (you mentioned joins!?)
or is there somewhere an option to set?
thanks again!


Because Hibernate returns Objects. Your example above in HQL would return a List of Object[]'s with obj[0] being type Name and obj[1] being type Product.

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 5:23 am 
Newbie

Joined: Thu Aug 11, 2005 7:43 am
Posts: 5
hello
i rewrote the query like this

<query name="com.xcelso.hc.dao.InquiryFinder.findPendingInquirySummariesForMake">
<![CDATA[
select
new com.xcelso.hc.dto.InquirySummary(
id,
subject,
isBreakDown,
isReleaseAggregateInquiry,
isTechnicalInquiry,
isCompulsoryRegistration,
affectedAssemblyGroup,
expectedReplyDate,
amagNumber,
chassisNumber,
owner,
initialInquiryState,
currentInquiryState
)
from
com.xcelso.hc.dto.Inquiry as inq
join inq.id as id
join inq.subject as subject
join inq.customerComplaint.isBreakDown as isBreakDown
join inq.isReleaseAggregateInquiry as isReleaseAggregateInquiry
join inq.isTechnicalInquiry as isTechnicalInquiry
join inq.isCompulsoryRegistration as isCompulsoryRegistration
join inq.workshopClarification.affectedAssemblyGroup as affectedAssemblyGroup
join inq.expectedReplyDate as expectedReplyDate
join inq.owner as owner
join inq.initialInquiryState as initialInquiryState
join inq.currentInquiryState as currentInquiryState,
com.xcelso.hc.dto.Vehicle as vehicle
join vehicle.amagNumber as amagNumber
join vehicle.chassisNumber as chassisNumber
where
inq.vehicleInfo.vehicle = vehicle
and
inq.owner.make = :make
and
inq.currentInquiryState.state.class <> com.xcelso.hc.dto.ClosedNotToPublish
and
inq.currentInquiryState.state.class <> com.xcelso.hc.dto.ClosedToPublish
]]>
</query>

but i get now following error

net.sf.hibernate.PropertyNotFoundException: no appropriate constructor in class: com.xcelso.hc.dto.InquirySummary
at net.sf.hibernate.util.ReflectHelper.getConstructor(ReflectHelper.java:200)
at net.sf.hibernate.hql.QueryTranslator.renderSQL(QueryTranslator.java:551)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:155)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1554)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1525)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.xcelso.hc.dao.InquiryFinderImpl.searchPendingAdvisorInquirySummariesFor(InquiryFinderImpl.java:181)
at com.xcelso.forum.dto.BusinessModelFacade.searchAdvisorTopicsSummariesFor(BusinessModelFacade.java:1155)
at com.xcelso.forum.dto.BusinessModelFacade.searchTopicsSummariesFor(BusinessModelFacade.java:1127)
at com.xcelso.forum.server.ForumManagerImpl.getTopicSummaries(ForumManagerImpl.java:76)
at com.xcelso.forum.client.GetTopicSummariesAction.perform(GetTopicSummariesAction.java:89)
at org.apache.struts.action.Action.execute(Action.java:420)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at ch.hehr.struts.security.LoginFilter.doFilter(LoginFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
rethrown as com.xcelso.hc.dao.PersistencyException: com.xcelso.hc.dao.InquiryFinder.findPendingInquirySummariesForMake failed. make: com.xcelso.hc.dto.Make@149a2c8[id=2]: no appropriate constructor in class: com.xcelso.hc.dto.InquirySummary
at com.xcelso.hc.dao.BaseFinder.throwPersistencyException(BaseFinder.java:24)
at com.xcelso.hc.dao.InquiryFinderImpl.searchPendingAdvisorInquirySummariesFor(InquiryFinderImpl.java:183)
at com.xcelso.forum.dto.BusinessModelFacade.searchAdvisorTopicsSummariesFor(BusinessModelFacade.java:1155)
at com.xcelso.forum.dto.BusinessModelFacade.searchTopicsSummariesFor(BusinessModelFacade.java:1127)
at com.xcelso.forum.server.ForumManagerImpl.getTopicSummaries(ForumManagerImpl.java:76)
at com.xcelso.forum.client.GetTopicSummariesAction.perform(GetTopicSummariesAction.java:89)
at org.apache.struts.action.Action.execute(Action.java:420)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at ch.hehr.struts.security.LoginFilter.doFilter(LoginFilter.java:69)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Caused by: net.sf.hibernate.PropertyNotFoundException: no appropriate constructor in class: com.xcelso.hc.dto.InquirySummary
at net.sf.hibernate.util.ReflectHelper.getConstructor(ReflectHelper.java:200)
at net.sf.hibernate.hql.QueryTranslator.renderSQL(QueryTranslator.java:551)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:155)
at net.sf.hibernate.hql.QueryTranslator.compile(QueryTranslator.java:138)
at net.sf.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:293)
at net.sf.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1554)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1525)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.xcelso.hc.dao.InquiryFinderImpl.searchPendingAdvisorInquirySummariesFor(InquiryFinderImpl.java:181)
... 43 more

did i made a mistake during rewriting the query?

the constructor of InquirySummary has not changed!?

public InquirySummary(Long anId,
String aSubject,
Boolean isBreakDown,
Boolean isReleaseAggregateInquiry,
Boolean isTechnicalInquiry,
Boolean isCompulsoryRegistration,
String affectedAssemblyGroup,
Date expectedReplyDate,
Integer amagVehicleNumber,
String vehicleChassisNumber,
PartnerMake owner,
InquiryState initialInquiryState,
InquiryState currentInquiryState) {
super();
...
}

thanks for further help/tips!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 7:55 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
I don't understand why you make join on simple properties
instead of
Code:
select subject from Inquiry inq join inq.subject as subject

you can do
Code:
select inq.subject from Inquiry inq


you only have to make joins on other entities.

For your problem, put a breakpoint in ReflectHelper line 200 and see why hibernate don't find your constructor

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 8:42 am 
Newbie

Joined: Thu Aug 11, 2005 7:43 am
Posts: 5
hello
i had the simple properties solution,
but than you proposed the solution with the joins.
but as it looks like i misunderstood you.
but how did you ment it with the joins?
how can i optimize my original query,
so that not for each item in the list a db access will be generated?
thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 8:50 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
I was guessing that doing join between inquiry and vehicle (instead of the cartesian product you have) would solve your problem, maybe I am wrong

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 9:05 am 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
scesbron wrote:
I was guessing that doing join between inquiry and vehicle (instead of the cartesian product you have) would solve your problem, maybe I am wrong


I think the query should look something like this.
Code:
select new com.xcelso.hc.dto.InquirySummary(
    inq.id,
    inq.subject,
    inq.isBreakDown,
    inq.isReleaseAggregateInquiry,
    inq.isTechnicalInquiry,
    inq.isCompulsoryRegistration,
    wsc.affectedAssemblyGroup,
    inq.expectedReplyDate,
    vehicle.amagNumber,
    vehicle.chassisNumber,
    inq.owner,
    inq.initialInquiryState,
    inq.currentInquiryState
)
from Inquiry as inq
join inq.workshopClarification as wsc
join inq.owner as owner
join inq.initialInquiryState as initialInquiryState
join inq.currentInquiryState as currentInquiryState
join inq.vehicleInfo as vehicle
where owner.make = :make
  and currentInquiryState.state.class <> com.xcelso.hc.dto.ClosedNotToPublish
  and currentInquiryState.state.class <> com.xcelso.hc.dto.ClosedToPublish


As for the problem with the Constructor, I would double check all the data types (i.e. both are using java.util.Date or java.sql.Date, not one each etc...)

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 17, 2005 5:58 am 
Newbie

Joined: Thu Aug 11, 2005 7:43 am
Posts: 5
hello
i tried your solution and a lot of different other ones,
but without success!?
but i found out, that the "states" causes the problem
and i removed now these states from the InquirySummary
and added some attributes of these states
directly to the InquirySummary and then it seems to work!?
thanks for your help anyway!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 11 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.