Return-Path: Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 87012 invoked from network); 30 Jun 2003 23:07:46 -0000 Received: from outbound05.telus.net (HELO priv-edtnes43.telusplanet.net) (199.185.220.224) by daedalus.apache.org with SMTP; 30 Jun 2003 23:07:46 -0000 Received: from localhost ([199.185.220.240]) by priv-edtnes43.telusplanet.net (InterMail vM.5.01.05.17 201-253-122-126-117-20021021) with ESMTP id <20030630230753.CPZN2081.priv-edtnes43.telusplanet.net@localhost> for ; Mon, 30 Jun 2003 17:07:53 -0600 Received: from 204.62.206.252 ( [204.62.206.252]) as user a7b46501@192.168.200.1 by webmail.telus.net with HTTP; Mon, 30 Jun 2003 16:07:53 -0700 Message-ID: <1057014473.3f00c2c96e40a@webmail.telus.net> Date: Mon, 30 Jun 2003 16:07:53 -0700 From: a7b46501@telus.net To: torque-user@db.apache.org Subject: question on Torque's limitation MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1-cvs X-Originating-IP: 204.62.206.252 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Suppose I have an Oracle table called A and a table called A_TR (TR stands for translation) for multi-language support. These two tables contain following columns respectively: A.ID (pk), A.NAME A_TR.ID(pk, fk to A.ID), A_TR.LOCALE (pk), A_TR.NAME If I want to get A_TR.NAME if it is available, othwise use A.NAME. Using SQL, I can get it pretty easily: select nvl(A_TR.name,A.name) as name from A, A_TR where A.id=A_TR.id(+) and lower(A_TR.locale(+)) = lower('en-us') But it seems in Torque this will be awefully complex if not impossible (unless I resort back to brute force SQL). The complication arises from: 1. Creteria doesn't support outer-join 2. The peer class doesn't support ad hoc SELECT clause. I can only get the columns within a table. Combining columns in two tables with Oracle function such as NVL is almost impossible. Since I am new to Torque, I would like confirmation if these indeed are limitation of Torque. Is there any get-around that doesn't need multiple db hit (don't take query cache into account)? Thanks