| Hi all I have a problem doing the operation Restrictions.eq("property", value). The property is of type "text" and the value that hold the column is  Base64 String that representa a Hash Code. I´m trying get the object "Documento" doing an "eq" to the properties of the Object but I get the ORA-00932 error. What I´m doing wrong? Any ideas?. Thanks in advance, and happy new year.
 Hibernate version: 3.1.3
 
 The mapping files:
 
 <hibernate-mapping package="com.interoperatividad.registroentradasalida">
 <class name="Documento" table="documento">
 
 <id name="id" type="long">
 <generator class="native"/>
 </id>
 
 <property name="documentoPk" type="string" not-null="true"/>
 <property name="hash" type="text" not-null="true"/>
 </class>
 </hibernate-mapping>
 
 Full stack trace of any exception that occurs:
 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select this_.id as id14_0_, this_.documentoPk as document2_14_0_, this_.hash as hash14_0_ from documento this_ where this_.documentoPk=? and this_.hash=?]
 java.sql.SQLException: ORA-00932: inconsistent datatypes: expected - got CLOB
 
 oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
 at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
 at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
 at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
 at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
 at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
 at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
 at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
 at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
 at  org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
 at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
 at org.hibernate.loader.Loader.getResultSet(Loader.java:1668)
 at org.hibernate.loader.Loader.doQuery(Loader.java:662)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
 at org.hibernate.loader.Loader.doList(Loader.java:2144)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
 at org.hibernate.loader.Loader.list(Loader.java:2023)
 at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:95)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
 at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
 at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305)
 
 Name and version of the database you are using: Oracle 10g
 
 The generated SQL (show_sql=true):
 
 2007-12-26 07:41:18,876 INFO  [STDOUT] Hibernate:
 select
 this_.id as id14_0_,
 this_.documentoPk as document2_14_0_,
 this_.hash as hash14_0_
 from
 documento this_
 where
 this_.documentoPk=?
 and this_.hash=?
 
 
 |