|
In the TRACE output below my HQL query has selection criteria which includes "campaign.id.campaignId in (set...)". In the DEBUG output 2 log entries later my the SQL selection criteria has changed to "campaignof0_.scheme_no in (set...)".
I can't understand why hibernate is mapping the wrong entity field in this way, or figure out a workaround. Has anyone seen this issue before?
Hibernate EntityManager 3.2.1.GA
Hibernate Annotations 3.2.1.GA
Hibernate 3.2.3
Backing database is Oracle 10g
I haven't included the code at this stage - still creating a test case.
2007-08-16 12:12:43,960 TRACE [org.hibernate.engine.query.HQLQueryPlan] find: FROM CampaignOffers WHERE status=?2 AND expires > CURRENT_TIMESTAMP AND campaign.id.campaignId in ('CAMPAIGN_1','CAMPAIGN_2','CAMPAIGN_3','CAMPAIGN_4','CAMPAIGN_5','CAMPAIGN_6') AND campaign.id.schemeNo=?1
2007-08-16 12:12:43,960 TRACE [org.hibernate.engine.QueryParameters] named parameters: {2=OPEN, 1=1}
2007-08-16 12:12:43,960 DEBUG [org.hibernate.SQL] select campaignof0_.offer_no as offer1_33_, campaignof0_.short_description as short2_33_, campaignof0_.expires as expires33_, campaignof0_.scheme_no as scheme4_33_, campaignof0_.created_date as created5_33_, campaignof0_.remaining_redemptions as remaining6_33_, campaignof0_.reduction_value as reduction7_33_, campaignof0_.min_award as min8_33_, campaignof0_.campaign_id as campaign29_33_, campaignof0_.offer_type as offer9_33_, campaignof0_.reduction_type as reduction28_33_, campaignof0_.created_by as created10_33_, campaignof0_.modified_by as modified11_33_, campaignof0_.modified_date as modified12_33_, campaignof0_.offer_seq_id as offer13_33_, campaignof0_.long_description as long14_33_, campaignof0_.status as status33_, campaignof0_.min_item as min16_33_, campaignof0_.min_value as min17_33_, campaignof0_.max_award as max18_33_, campaignof0_.budget as budget33_, campaignof0_.max_trans_redemptions as max20_33_, campaignof0_.max_redemptions as max21_33_, campaignof0_.max_customers as max22_33_, campaignof0_.remaining_budget as remaining23_33_, campaignof0_.remaining_customers as remaining24_33_, campaignof0_.alert_threshold_budget as alert25_33_, campaignof0_.alert_threshold_redemptions as alert26_33_, campaignof0_.alert_threshold_customer as alert27_33_ from dboppt.campaign_offers campaignof0_ where status=? and campaignof0_.expires>CURRENT_TIMESTAMP and (campaignof0_.scheme_no in ('CAMPAIGN_1' , 'CAMPAIGN_2' , 'CAMPAIGN_3' , 'CAMPAIGN_4' , 'CAMPAIGN_5' , 'CAMPAIGN_6')) and campaignof0_.campaign_id=?
|