I am rewriting an app for a legacy system that has already created many stored procedures. I have gotten a "fetch" to work calling an existing stored procedure initially created in Oracle defined with a SYS_REFCURSOR as an OUT parameter. Issue is that the stored procedure contains a query with a few table joins. I am trying to figure out the mapping that needs to be constructed in the ...hbm.xml configuration file. I have the following: <!-- mapping for table 1 --> <class name="com.somepackage.table1" table="table1"> <id name="table1id"> <generator class="native"/> </id> <property name="secondcol"/> <many-to-one name="table2" class="com.somepackage.table2" column="table2fk" not-null="true"/> </class>
<!-- mapping for table 2 --> <class name="com.somepackage.table2" table="table2"> <id name="table2id"> <generator class="native"/> </id> <property name="secondcol"/> </class>
I have the corresponding POJOs with getters and setters. If I comment the "<many-to-on...", the code works fine. If not, I get the "Unable to instantiate default tuplizer" exception. I included the javassist-3.4.GA.jar so this does not seem to be the issue. I get the same result when dropping my SELECT stmt. from the stored procedure into the ...hbm.xml file.
|