Return-Path: Delivered-To: apmail-db-ojb-user-archive@www.apache.org Received: (qmail 97812 invoked from network); 8 Jun 2005 12:09:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jun 2005 12:09:15 -0000 Received: (qmail 51600 invoked by uid 500); 8 Jun 2005 12:09:12 -0000 Delivered-To: apmail-db-ojb-user-archive@db.apache.org Received: (qmail 51568 invoked by uid 500); 8 Jun 2005 12:09:11 -0000 Mailing-List: contact ojb-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "OJB Users List" Reply-To: "OJB Users List" Delivered-To: mailing list ojb-user@db.apache.org Received: (qmail 51549 invoked by uid 99); 8 Jun 2005 12:09:11 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from etumbx.unige.ch (HELO etumbx.unige.ch) (129.194.9.235) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 08 Jun 2005 05:09:10 -0700 Received: from conversion-daemon.etumbx.unige.ch by etumbx.unige.ch (Sun Java System Messaging Server 6.1 HotFix 0.11 (built Jan 28 2005)) id <0IHR00501I9UMR00@etumbx.unige.ch> (original mail from thomas0@etu.unige.ch) for ojb-user@db.apache.org; Wed, 08 Jun 2005 14:08:05 +0200 (CEST) Received: from localhost (etuweb2.unige.ch [129.194.9.238]) by etumbx.unige.ch (Sun Java System Messaging Server 6.1 HotFix 0.11 (built Jan 28 2005)) with ESMTP id <0IHR004BALPG8T30@etumbx.unige.ch> for ojb-user@db.apache.org; Wed, 08 Jun 2005 14:08:04 +0200 (CEST) Received: from line-zh-118-249.adsl.econophone.ch (line-zh-118-249.adsl.econophone.ch [212.53.118.249]) by www.etu.unige.ch (IMP) with HTTP for ; Wed, 08 Jun 2005 14:08:04 +0200 Date: Wed, 08 Jun 2005 14:08:04 +0200 From: thomas0@etu.unige.ch Subject: Oracle exception: column ambiguously defined - need help To: ojb-user@db.apache.org Message-id: <1118232484.42a6dfa44f659@www.etu.unige.ch> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Comment: This message was scanned against viruses by etumbx.unige.ch. User-Agent: Internet Messaging Program (IMP) 3.2.2 X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, My name is Alexandre and I'm a student in the University of Geneva in the Information Systems departement. I'm currently working on a web application using an OJB layer. I have a problem of column ambiguously defined when querying my Oracle Database through OJB's QueryFactory method. I read Jakob Braeuchi's answer to Naveen regarding column prefixes. Unfortunately, I didn't quite understand his solution: how can I base columns on attributes? here is the method querying the database: PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker(); Collection rootelements = null; Criteria crit = new Criteria(); crit.addEqualTo("INROOT","1"); Query q = QueryFactory.newQuery(Folder.class, crit); try{ rootelements = broker.getCollectionByQuery(q); } catch(PersistenceBrokerException e) { e.printStackTrace(); if(broker != null) broker.abortTransaction(); } finally { if (broker != null) broker.close(); } And here is the part of the relevant repository: When logging OJB's activity, I can see the query who raises the Oracle exception (ORA-00918: column ambiguously defined), here it is: SELECT A0.ID_FOLDER FROM FM.FOLDER A0,INFOLD,FM.element A1,INFOLD WHERE A0.ID_FOLDER=A1.ID_ELEMENT AND ((INFOLD.FOL_ID_ELEMENT IN (?,?,?)) AND A0.ID_FOLDER = INFOLD.ID_ELEMENT) I'm a bit lost since it's my first time using OJB (I hope it's not the last). Thanks a lot for reading my request and thanks in advance for your help. Yours Sincerely, Alexandre Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org For additional commands, e-mail: ojb-user-help@db.apache.org