-->
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: Object is not loaded.
PostPosted: Wed Jun 15, 2005 1:52 pm 
Beginner
Beginner

Joined: Wed Feb 23, 2005 10:37 am
Posts: 29
I dont know what is happening with the loading.
It seems like Hibernate is finding the result set but the list does not contain anything:

The mapping file:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

Code:
<hibernate-mapping>
    <class name="com.inte.Integra" table="integra">
        <composite-id>
            <key-property name="forid"/>
            <key-property name="remote"/>
            <key-property name="property"/>
        </composite-id>
    </class>
</hibernate-mapping>


There is a row in DB and it seems like HB finds it:
Code:
15 jun 19:48:03,801 DEBUG org.hibernate.type.IntegerType:86 - returning '112' as column: for1_0_
15 jun 19:48:03,801 DEBUG org.hibernate.type.StringType:86 - returning 'http://localhost/axis/services' as column: remot2_0_
15 jun 19:48:03,801 DEBUG org.hibernate.type.StringType:80 - returning null as column: property0_
15 jun 19:48:03,811 DEBUG org.hibernate.loader.Loader:828 - result row: null
15 jun 19:48:03,811 DEBUG org.hibernate.loader.Loader:429 - done processing result set (1 rows)
15 jun 19:48:03,811 DEBUG org.hibernate.jdbc.AbstractBatcher:313 - about to close ResultSet (open ResultSets: 1, globally: 1)
15 jun 19:48:03,811 DEBUG org.hibernate.jdbc.AbstractBatcher:298 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
15 jun 19:48:03,811 DEBUG org.hibernate.jdbc.AbstractBatcher:416 - closing statement
15 jun 19:48:03,811 DEBUG org.hibernate.loader.Loader:528 - total objects hydrated: 0


When I write out the list it has nothing:
Code:
List list = HibernateUtil.currentSession().createCriteria(Integra.class).list();
        System.out.println("list:"+list);
        System.out.println("list.get(0):"+list.get(0));

Which comes out in stdout as:
Code:
list:[null]
list.get(0):null


Any help is appreciated.
Naimdjon


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.