hibernate cannot read view with null column -


i have view reads table null columns. have hibernate code reads view. issue hibernate not able read record due null value. looking @ logs see following

debug [http-bio-8080-exec-1][2013-05-20 23:34:16,243][nullabletype.java:166] - returning null column: address19_0_

it able read non null columns when comes address null in case throws exception. why hibernate not able read this?

i generating pojo , hbm.xml file using eclipse hibernate tool. here build.xml hibernate tool

<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.hibernatetooltask">     <classpath>         <fileset dir="c:\eclipse\order\webcontent\web-inf\lib">             <include name="**/*.jar" />         </fileset>     </classpath> </taskdef>  <target name="gen_hibernate" description="generate hibernate classes">     <hibernatetool destdir="c:\eclipse\order\gencode">         <jdbcconfiguration configurationfile="hibernate.cfg.xml"             packagename="com.order" detectmanytomany="true" />         <hbm2hbmxml destdir="src" />         <hbm2java jdk5="true" destdir="src" />         <hbm2cfgxml destdir="src" />         <hbm2doc />     </hibernatetool>      <copy todir="c:\eclipse\order\src\order\">         <fileset dir="c:\eclipse\order\gencode\src\com\order\">             <include name="**/*.java" />             <include name="**/*.hbm.xml" />         </fileset>     </copy>     <copy file="c:\eclipse\order\gencode\src\hibernate.cfg.xml" todir="c:\eclipse\order\src\" /> </target> 

and here generated hbm.xml view, generating composite id

<?xml version="1.0"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <!-- generated may 20, 2013 11:26:25 pm hibernate tools 3.2.0.cr1 --> <hibernate-mapping>     <class name="com.order.vorderdetail" table="v_orderdetail" catalog="order">         <composite-id name="id" class="com.order.vorderdetailid">             <key-property name="orderid" type="int">                 <column name="orderid" />             </key-property>             <key-property name="userid" type="int">                 <column name="userid" />             </key-property>             <key-property name="createdate" type="date">                 <column name="createdate" length="0" />             </key-property>             <key-property name="description" type="string">                 <column name="description" length="65535" />             </key-property>             <key-property name="addressline1" type="string">                 <column name="addressline1" length="100" />             </key-property>             <key-property name="addressline2" type="string">                 <column name="addressline2" length="100" />             </key-property>             <key-property name="city" type="string">                 <column name="city" length="100" />             </key-property>             <key-property name="state" type="string">                 <column name="state" length="10" />             </key-property>             <key-property name="zipcode" type="string">                 <column name="zipcode" length="10" />             </key-property>         </composite-id>     </class> </hibernate-mapping> 

properties mapped columns containing null values should not used part of composite id. there rejected ticket hhh-1109 use case.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -