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