I'm having a strange problem where my simple finder isn't finding my record, even though the record is in the database (I closed all connections I was using outside of the application to make sure it wasn't a commit problem).
Everything appears to run correctly, and I c-n-p'd the query into SQL*Plus and it came back w/ the record find (the difference being I had to replace the binding manually w/ 'I').
Anyone see anything wrong, or know where I can look?
Hibernate version:3
Mapping documents:
RefCaseStatus.hbm.xml:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
-->
<class name="x.to.RefCaseStatus" table="REF_CASE_STATUS" schema="ATFPSBADMIN">
<id name="caseStatusCode" type="string">
<column name="CASE_STATUS_CODE" length="2" />
<generator class="assigned" />
</id>
<property name="caseStatusName" type="string">
<column name="CASE_STATUS_NAME" length="32" not-null="true" />
</property>
<property name="caseStatusDesc" type="string">
<column name="CASE_STATUS_DESC" length="1000" not-null="true" />
</property>
<property name="createUser" type="string">
<column name="CREATE_USER" length="32" not-null="true" />
</property>
<property name="createDt" type="timestamp">
<column name="CREATE_DT" length="7" not-null="true" />
</property>
<property name="updateUser" type="string">
<column name="UPDATE_USER" length="32" />
</property>
<property name="updateDt" type="timestamp">
<column name="UPDATE_DT" length="7" />
</property>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs:None -- No exceptions thrown
Name and version of the database you are using:Oracle9i
The generated SQL (show_sql=true):Hibernate: select refcasesta0_.CASE_STATUS_CODE as CASE1_0_, refcasesta0_.CASE_STATUS_NAME as CASE2_23_0_, refcasesta0_.CASE_STATUS_DESC as CASE3_23_0_, refcasesta0_.CREATE_USER as CREATE4_23_0_, refcasesta0_.CREATE_DT as CREATE5_23_0_, refcasesta0_.UPDATE_USER as UPDATE6_23_0_, refcasesta0_.UPDATE_DT as UPDATE7_23_0_ from ATFPSBADMIN.REF_CASE_STATUS refcasesta0_ where refcasesta0_.CASE_STATUS_CODE=?
Debug level Hibernate log excerpt:Code:
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.event.def.DefaultLoadEventListener - loading entity: [x.to.RefCaseStatus#I]
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.event.def.DefaultLoadEventListener - attempting to resolve: [x.to.RefCaseStatus#I]
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.event.def.DefaultLoadEventListener - object not resolved in any cache: [x.to.RefCaseStatus#I]
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.persister.entity.BasicEntityPersister - Materializing entity: [x.to.RefCaseStatus#I]
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.loader.Loader - loading entity: [x.to.RefCaseStatus#I]
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.SQL - select refcasesta0_.CASE_STATUS_CODE as CASE1_0_, refcasesta0_.CASE_STATUS_NAME as CASE2_23_0_, refcasesta0_.CASE_STATUS_DESC as CASE3_23_0_, refcasesta0_.CREATE_USER as CREATE4_23_0_, refcasesta0_.CREATE_DT as CREATE5_23_0_, refcasesta0_.UPDATE_USER as UPDATE6_23_0_, refcasesta0_.UPDATE_DT as UPDATE7_23_0_ from ATFPSBADMIN.REF_CASE_STATUS refcasesta0_ where refcasesta0_.CASE_STATUS_CODE=?
2005-10-21 18:09:29,375 DEBUG [main] org.hibernate.jdbc.AbstractBatcher - preparing statement
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.type.StringType - binding 'I' to parameter: 1
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.loader.Loader - processing result set
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.loader.Loader - done processing result set (0 rows)
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.jdbc.AbstractBatcher - closing statement
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.loader.Loader - total objects hydrated: 0
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.engine.PersistenceContext - initializing non-lazy collections
2005-10-21 18:09:29,390 DEBUG [main] org.hibernate.loader.Loader - done entity load