I am getting the error message below.
Here is the hbm.xm settings:
<hibernate-mapping>
<class name="rapidReview.core.hibernate.PrJournalRoleInfo" table="PR_JOURNAL_ROLE_INFO" schema="AACR20_DBA">
<composite-id name="id" class="rapidReview.core.hibernate.PrJournalRoleInfoId">
<key-property name="prPersonId" type="java.lang.Long">
<column name="PR_PERSON_ID" precision="10" scale="0" />
</key-property>
<key-property name="slNo" type="java.lang.Long">
<column name="SL_NO" precision="10" scale="0" />
</key-property>
</composite-id>
<property name="journalCode" type="java.lang.String">
<column name="JOURNAL_CODE" length="10" not-null="true" />
</property>
<property name="sectionCode" type="java.lang.String">
<column name="SECTION_CODE" length="10" />
</property>
<property name="roleId" type="java.lang.Long">
<column name="ROLE_ID" precision="10" scale="0" not-null="true" />
</property>
Here is the failing code:
hql = "select pr.id from PrJournalRoleInfo pr where pr.id=:personId";
qry = sess.createQuery(hql);
qry.setLong("personId", personId.longValue());
List listMsRoleInfo = qry.list();
Any ideas would be grateful?
13 Jun 2007 18:34:37 [0_623=WebEcommerceSetup] DEBUG -could not execute query [select prjournalr0_.PR_PERSON_ID as col_0_0_, prjournalr0_.SL_NO as col_0_1_ from AACR20_DBA.PR_JOURNAL_ROLE_INFO prjournalr0_ where (prjournalr0_.PR_PERSON_ID, prjournalr0_.SL_NO)=?]
java.sql.SQLException: ORA-00920: invalid relational operator
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2391)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2672)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:527)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html