Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 68682 invoked from network); 29 Sep 2008 07:09:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Sep 2008 07:09:35 -0000 Received: (qmail 65991 invoked by uid 500); 29 Sep 2008 07:09:33 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 65977 invoked by uid 500); 29 Sep 2008 07:09:33 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 65966 invoked by uid 99); 29 Sep 2008 07:09:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 00:09:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Sep 2008 07:08:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4E342234C1E2 for ; Mon, 29 Sep 2008 00:08:44 -0700 (PDT) Message-ID: <2127036529.1222672124319.JavaMail.jira@brutus> Date: Mon, 29 Sep 2008 00:08:44 -0700 (PDT) From: "Ralph Weires (JIRA)" To: torque-dev@db.apache.org Subject: [jira] Commented: (TORQUE-108) Criteria addJoin causes incorrect SQL to be generated when optional schema references are in use (Oracle) In-Reply-To: <26768856.1202164507984.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TORQUE-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635307#action_12635307 ] Ralph Weires commented on TORQUE-108: ------------------------------------- I have the exact same problem using a MSSQL database with a custom schema (instead of the default 'dbo' schema). The SQL generated for queries without joins works fine, but as soon as I add a join (doJoin), the generated SQL becomes invalid, in the same way as already described by Brendan above. I checked the latest SVN trunk and saw that the patch provided by Brendan is not included there yet, so is there a chance this patch might become integrated anytime soon? > Criteria addJoin causes incorrect SQL to be generated when optional schema references are in use (Oracle) > --------------------------------------------------------------------------------------------------------- > > Key: TORQUE-108 > URL: https://issues.apache.org/jira/browse/TORQUE-108 > Project: Torque > Issue Type: Bug > Components: Runtime > Affects Versions: 3.3-RC1, 3.3-RC2, 3.3-RC3 > Environment: Linux, Java 1.6 > Reporter: Brendan Miller > Attachments: joinbuilder.patch, JoinBuilderTest.java > > > I previously wrote about this to torque-user in Oct 2007. > In a schema definition that includes torque.dsfactory.programs.schema, writing the following > Criteria crit = new Criteria(); > crit.addJoin(TransactionPeer.ORDER_ID, OrderPeer.ID); > crit.add(TransactionPeer.ACCT_ID, account.getID()); > List orders = OrderPeer.doSelect(crit); > generates > SELECT <..ORDERS columns..> FROM TRANSACTION, ORDERS, DBSCHEMA.ORDERS, DBSCHEMA.TRANSACTION > WHERE TRANSACTION.ORDER_ID=ORDERS.ID AND TRANSACTION.ACCT_ID= ? > Upon examining the Torque code, it appears that SQLBuilder.processJoins does not add the full table names, while SQLBuilder.processCriterions does. > Shouldn't they both add the full table names? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org