<hibernate-mapping> <class name="com.Person" table="Person"> <composite-id name="id" class="IDClass"> <key-property name="PNUM" type="java.lang.Integer"> <column name="PID" /> </key-property> <key-property name="LNUM" type="java.lang.String"> <column name="LID" length="6" /> </key-property> </composite-id> <set name="Address" inverse="true" lazy="true" where=" ADDRESS_CD in ('M','O','R') and ADDR_EFF_DT <= CURRENT DATE and (CURRENT DATE <= ADDR_EXP_DT or ADDR_EXP_DT is null) and CREATION_TMSTMP = (select max(add1.CREATION_TMSTMP) from ADDRESS add1 where add1.PID = PID and add1.address_cd = address_cd and add1.ADDR_EFF_DT = ADDR_EFF_DT) " > <key> <column name="PID" /> <column name="LID"/> </key> <one-to-many class="com.Address" /> </set>
When i use a "hibernate.connection.url" with "hibernate.connection.currentSchema" the schema is properly getting associated but when I used a "hibernate.default_schema" with datasource "hibernate.connection.datasource" with the below properties <property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property> <property name="net.sf.hibernate.transaction.JTATransactionFactory"> net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property>
The query fired by hibernate for the association is without the schema value. Please let me know if i can circumvent this issue.
I tried with hibernate 3.3 api files.
Regards, Subash
|