I am expecting the following data
Ram Laxman Sita
Tom Dick Harry
Amar Akbar Anthony
but i am getting back
Ram Laxman Sita
Ram Laxman Sita
Ram Laxman Sita
I calling a oracle stored procedure that returns a ref cursor as the out paramter with the above mentioned data. If I run the cursor sql direcly I get correct records back but through Hibernate they are all same, any idea
mapping file:-
<class name ="GetNames" >
<id name="name1" type="java.lang.String">
<generator class="native" />
</id>
<property
name="name2"
type="java.lang.String"
/>
<property
name="name3"
type="java.lang.String"
/>
</class>
<sql-query name="claimsp" callable="true">
<!-- return-scalar column="claim_id" type="string" ></return-scalar>
<return-scalar column="stat_cd" type="string"></return-scalar>
<return-scalar column="error_cd" type="string"></return-scalar-->
<return class ="com.ibx.ecommerce.domain.hibernate.ClaimStatErrorAudit">
<return-property name="name1" column="name_1"/>
<return-property name="name2" column="name_2"/>
<return-property name="name3" column="name_3"/>
</return>
{ call C.getNames(?,:inid)}
</sql-query>
|