-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: query with set relation
PostPosted: Thu Aug 05, 2004 3:03 pm 
Newbie

Joined: Mon Aug 02, 2004 12:11 pm
Posts: 10
Location: Mexico D.F.
Hi, how do i resolve this problem, i want to do a query between 2 tables with this relation in my table A :
<set inverse="true" lazy="true" name="archivoSet">
<key column="FL_CAMPANIA" />
<one-to-many class="TmkCampaniaArchivo" />
</set>

and I create my criterias this:
Criteria criterios = getSession().createCriteria(TmkCampania.class);
if(parametros[0].trim().length()>0 && Integer.parseInt(parametros[0])>=0){
criterios.add(Expression.eq("clUnegocio",new Integer(parametros[0])));
}
if(parametros[1].trim().length()>0 && Integer.parseInt(parametros[1])>0){
criterios.add(Expression.eq("flCampania",new Integer(parametros[1])));
criterios.createCriteria("archivoSet").add(Expression.eq("clTipoArchivo",new Integer(54)));
criterios.createCriteria("archivoSet").add(Expression.eq("clTipoArchivo",new Integer(53)));
Integer(53)));
}
return criterios.list();

I want to filter some data adding a two filters by clTipoArchivo,
and I obtain an error like this :


WARNING: SQL Error: 904, SQLState: 42000
Aug 5, 2004 2:02:40 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ORA-00904: "X0_"."CL_TIPO_ARCHIVO": invalid identifier

WARNING: SQL Error: 904, SQLState: 42000
Aug 5, 2004 2:02:40 PM net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ORA-00904: "X0_"."CL_TIPO_ARCHIVO": invalid identifier

Aug 5, 2004 2:02:40 PM net.sf.hibernate.JDBCException <init>
SEVERE: SQLException occurred
java.sql.SQLException: ORA-00904: "X0_"."CL_TIPO_ARCHIVO": invalid identifier

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 net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:800)
at net.sf.hibernate.loader.Loader.doQuery(Loader.java:189)
at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
at net.sf.hibernate.loader.Loader.list(Loader.java:946)
at net.sf.hibernate.loader.CriteriaLoader.list(CriteriaLoader.java:121)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3604)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
at ixemkt.sd.catalogos.dao.TmkCampaniaDAO.obtenDisCampania(TmkCampaniaDAO.java:53)
at ixemkt.util.test.Test.testobtenDisCampania(Test.java:62)
at ixemkt.util.test.Test.main(Test.java:50)
net.sf.hibernate.JDBCException: SQLException occurred
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:3607)
at net.sf.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:238)
at ixemkt.sd.catalogos.dao.TmkCampaniaDAO.obtenDisCampania(TmkCampaniaDAO.java:53)
at ixemkt.util.test.Test.testobtenDisCampania(Test.java:62)
at ixemkt.util.test.Test.main(Test.java:50)
Caused by: java.sql.SQLException: ORA-00904: "X0_"."CL_TIPO_ARCHIVO": invalid identifier

what's wrong ?, thanks for your help!

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.