Hi all,
I have a problem with a simple query, Oracle Db. The java code is:
String query = "from it.app.iniziative.Esigenza where id = 1";
the mapping file is:
<class name="it.app.iniziative.Esigenza" table="PI_REQUIREMENTS">
<id name="id" type="int" unsaved-value="null" >
<column name="KCODE" sql-type="number(12)" not-null="true"/>
<generator class="sequence" >
<param name="sequence">s_requirements</param>
</generator>
</id>
<property name="sourceCode" >
<column name="SOURCE_CODE" sql-type="number(2)" />
</property>
<property name="codice" >
<column name="CODE" />
</property>
<property name="description">
<column name="DESCRIPTION" />
</property>
The log file returns:
INFO [http8070-Processor8] impl.SessionFactoryImpl - Query language substitutions: {}
WARN [http8070-Processor8] util.JDBCExceptionReporter - SQL Error: 904, SQLState: 42000
ERROR [http8070-Processor8] util.JDBCExceptionReporter - ORA-00904: invalid column name
ERROR [http8070-Processor8] util.JDBCExceptionReporter - Could not execute query
I've been trying with all columns of the table, but there is the same problem!
Could anyone help me?
|