-->
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.  [ 1 post ] 
Author Message
 Post subject: Restriction.in
PostPosted: Thu Jul 20, 2006 4:46 am 
Newbie

Joined: Mon Dec 13, 2004 5:50 am
Posts: 3
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.1.2
Mapping documents:
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="ch.rtc.business.baseServices.kf.verarbeitung.saldo.type">
<class name="BuSal_KontoSalden" table="kf_konto_salden">
<composite-id name="kontoPk" class="ch.rtc.business.businessValue.kontoId.BuKDa_KontoPK">
<key-property name="kontonummer" column="c_konto_id" type="ch.rtc.business.businessValue.hibernate.BvHb_KontoIdUserType"/>
<key-property name="mandant" column="c_mandant" type="ch.rtc.business.businessValue.hibernate.BvHb_MandantUserType"/>
</composite-id>
<version name="version" column="n_version" type="long"/>
<component name="kontoWhg"
class="ch.rtc.business.baseServices.kf.verarbeitung.saldo.type.BuSal_KontoSaldenWhg">
<property name="saldoAktuell" column="b_saldoAktuell_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoHeft" column="b_saldoHeft_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoVormonat" column="b_saldoVormonat_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoVorjahr" column="b_saldoVorjahr_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoVorvorjahr" column="b_saldoVorvorjahr_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoLetzterAbschluss" column="b_saldoLetzterAbschluss_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoHoechst" column="b_saldoHoechst_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoTiefst" column="b_saldoTiefst_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoMax" column="b_saldoMax_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoMin" column="b_saldoMin_KtoWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
</component>
<component name="bilanzWhg"
class="ch.rtc.business.baseServices.kf.verarbeitung.saldo.type.BuSal_KontoSaldenWhg">
<property name="saldoAktuell" column="b_saldoAktuell_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoHeft" column="b_saldoHeft_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoVormonat" column="b_saldoVormonat_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoVorjahr" column="b_saldoVorjahr_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoVorvorjahr" column="b_saldoVorvorjahr_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoLetzterAbschluss" column="b_saldoLetzterAbschluss_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoHoechst" column="b_saldoHoechst_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoTiefst" column="b_saldoTiefst_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoMax" column="b_saldoMax_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
<property name="saldoMin" column="b_saldoMin_BilWhg" type="ch.rtc.business.businessValue.hibernate.BvHb_BetragSn15n3UserType"/>
</component>
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

class kontoPk
{
Mandant mandant;
String id;
}

public BuSal_KontoSalden[] holeKontoSalden(BuKDa_KontoPK[] kontoIds)
throws BaEh_BusinessException
{

BuSal_KontoSalden[] result = null;

Criteria criteria = BuUt_KfSessionFactory.getCurrentSession().createCriteria(
BuSal_KontoSalden.class);
criteria.add(Restrictions.in("kontoPk", kontoIds));
List queryResult = criteria.list();
....
}


Full stack trace of any exception that occurs:
None. The statement is correct but the parameter binding not. Why?


Name and version of the database you are using:
Oracle 10g

The generated SQL (show_sql=true):

10:36:33,499 DEBUG SQL:346 - select this_.c_konto_id as c1_100_0_, this_.c_mandant as c2_100_0_, this_.n_version as n3_100_0_, this_.b_saldoAktuell_KtoWhg as b4_100_0_, this_.b_saldoHeft_KtoWhg as b5_100_0_, this_.b_saldoVormonat_KtoWhg as b6_100_0_, this_.b_saldoVorjahr_KtoWhg as b7_100_0_, this_.b_saldoVorvorjahr_KtoWhg as b8_100_0_, this_.b_saldoLetzterAbschluss_KtoWhg as b9_100_0_, this_.b_saldoHoechst_KtoWhg as b10_100_0_, this_.b_saldoTiefst_KtoWhg as b11_100_0_, this_.b_saldoMax_KtoWhg as b12_100_0_, this_.b_saldoMin_KtoWhg as b13_100_0_, this_.b_saldoAktuell_BilWhg as b14_100_0_, this_.b_saldoHeft_BilWhg as b15_100_0_, this_.b_saldoVormonat_BilWhg as b16_100_0_, this_.b_saldoVorjahr_BilWhg as b17_100_0_, this_.b_saldoVorvorjahr_BilWhg as b18_100_0_, this_.b_saldoLetzterAbschluss_BilWhg as b19_100_0_, this_.b_saldoHoechst_BilWhg as b20_100_0_, this_.b_saldoTiefst_BilWhg as b21_100_0_, this_.b_saldoMax_BilWhg as b22_100_0_, this_.b_saldoMin_BilWhg as b23_100_0_ from kf_konto_salden this_ where (this_.c_konto_id, this_.c_mandant) in ((?, ?), (?, ?))
Hibernate: select this_.c_konto_id as c1_100_0_, this_.c_mandant as c2_100_0_, this_.n_version as n3_100_0_, this_.b_saldoAktuell_KtoWhg as b4_100_0_, this_.b_saldoHeft_KtoWhg as b5_100_0_, this_.b_saldoVormonat_KtoWhg as b6_100_0_, this_.b_saldoVorjahr_KtoWhg as b7_100_0_, this_.b_saldoVorvorjahr_KtoWhg as b8_100_0_, this_.b_saldoLetzterAbschluss_KtoWhg as b9_100_0_, this_.b_saldoHoechst_KtoWhg as b10_100_0_, this_.b_saldoTiefst_KtoWhg as b11_100_0_, this_.b_saldoMax_KtoWhg as b12_100_0_, this_.b_saldoMin_KtoWhg as b13_100_0_, this_.b_saldoAktuell_BilWhg as b14_100_0_, this_.b_saldoHeft_BilWhg as b15_100_0_, this_.b_saldoVormonat_BilWhg as b16_100_0_, this_.b_saldoVorjahr_BilWhg as b17_100_0_, this_.b_saldoVorvorjahr_BilWhg as b18_100_0_, this_.b_saldoLetzterAbschluss_BilWhg as b19_100_0_, this_.b_saldoHoechst_BilWhg as b20_100_0_, this_.b_saldoTiefst_BilWhg as b21_100_0_, this_.b_saldoMax_BilWhg as b22_100_0_, this_.b_saldoMin_BilWhg as b23_100_0_ from kf_konto_salden this_ where (this_.c_konto_id, this_.c_mandant) in ((?, ?), (?, ?))
10:36:33,655 DEBUG StringType:79 - binding '111111111' to parameter: 1
10:36:33,655 DEBUG StringType:79 - binding '222222222' to parameter: 2
10:36:33,655 DEBUG ShortType:79 - binding '5' to parameter: 3
10:36:33,655 DEBUG ShortType:79 - binding '5' to parameter: 4


Debug level Hibernate log excerpt:


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

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.