-->
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: Query result list of 1 NULL object ??
PostPosted: Wed Sep 12, 2007 11:28 am 
Newbie

Joined: Wed Sep 12, 2007 10:18 am
Posts: 1
Location: Quebec
Hi everyone,

I have a problem with a query. I have a criteria which return a list of one object (in this case) but this object is Null. I dont understand what is the problem so I need your help.

Here is my java code :

Code:
Criteria criteria = session.createCriteria(Tdinv700.class)
.add(Restrictions.eq("id.item", sItem))
.add(Restrictions.eq("id.orno", iOrderNumber))
.addOrder(Order.asc("id.trdt"));
      
List list = criteria.list();



And here is my mapping :

Code:

<class name="com.mk.tdinv.Tdinv700" table="VW_TDINV700" schema="ADMINISTRATOR">
        <composite-id name="id" class="com.mk.tdinv.Tdinv700Id">
            <key-property name="item" type="string">
                <column name="ITEM" length="40" />
            </key-property>
            <key-property name="cwar" type="string">
                <column name="CWAR" length="3" />
            </key-property>
            <key-property name="trdt" type="date">
                <column name="TRDT" length="10" />
            </key-property>
            <key-property name="trtm" type="java.lang.Integer">
                <column name="TRTM" />
            </key-property>
            <key-property name="sern" type="java.lang.Integer">
                <column name="SERN" />
            </key-property>
            <key-property name="quan" type="java.lang.Double">
                <column name="QUAN" precision="53" scale="0" />
            </key-property>
            <key-property name="kost" type="java.lang.Short">
                <column name="KOST" />
            </key-property>
            <key-property name="koor" type="java.lang.Short">
                <column name="KOOR" />
            </key-property>
            <key-property name="orno" type="java.lang.Integer">
                <column name="ORNO" />
            </key-property>
            <key-property name="pono" type="java.lang.Integer">
                <column name="PONO" />
            </key-property>
            <key-property name="rlcd" type="string">
                <column name="RLCD" length="6" />
            </key-property>
            <key-property name="cprj" type="string">
                <column name="CPRJ" length="6" />
            </key-property>
            <key-property name="prst" type="java.lang.Short">
                <column name="PRST" />
            </key-property>
            <key-property name="exre" type="string">
                <column name="EXRE" length="6" />
            </key-property>
            <key-property name="schno" type="string">
                <column name="SCHNO" length="10" />
            </key-property>
            <key-property name="mitm" type="string">
                <column name="MITM" length="40" />
            </key-property>
            <key-property name="mcwar" type="string">
                <column name="MCWAR" length="3" />
            </key-property>
            <key-property name="opro" type="java.lang.Short">
                <column name="OPRO" />
            </key-property>
            <key-property name="ddate" type="date">
                <column name="DDATE" length="10" />
            </key-property>
            <key-property name="dttren" type="date">
                <column name="DTTREN" length="10" />
            </key-property>
            <key-property name="tmtren" type="java.lang.Integer">
                <column name="TMTREN" />
            </key-property>
            <key-property name="ustren" type="string">
                <column name="USTREN" length="10" />
            </key-property>
        </composite-id>
    </class>




Thanks in advance for any help

Hugues


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.