[
https://issues.apache.org/jira/browse/TORQUE-108?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brendan Miller updated TORQUE-108:
----------------------------------
Attachment: JoinBuilderTest.java
Here are some test cases for JoinBuilder. The first test should run fine on
the current source. The second test illustrates the use of a schema name on
the database and will fail without my previously-submitted patch. Both tests
run fine with the previous patch.
> 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<Order> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]