Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 11752 invoked from network); 1 Oct 2010 20:29:58 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 20:29:58 -0000 Received: (qmail 44883 invoked by uid 500); 1 Oct 2010 20:29:58 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 44790 invoked by uid 500); 1 Oct 2010 20:29:58 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 44782 invoked by uid 99); 1 Oct 2010 20:29:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 20:29:57 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 20:29:50 +0000 Received: from [192.168.15.18] (port=45579 helo=www.seitenbau.net) by mail.seitenbau.net with esmtp (Exim 4.69) (envelope-from ) id 1P1mEN-0001mi-2W for torque-user@db.apache.org; Fri, 01 Oct 2010 22:29:23 +0200 In-Reply-To: <4CA63D96.7040102@apache.org> References: <4CA638E3.4050004@apache.org> <4CA63D96.7040102@apache.org> Subject: Re: Revisited: Oracle and the empty string X-KeepSent: FDE26E92:6D6CDD77-C12577AF:006FB76F; type=4; name=$KeepSent To: "Apache Torque Users List" X-Mailer: Lotus Notes Release 8.5.1 September 28, 2009 Message-ID: From: Thomas Fischer Date: Fri, 1 Oct 2010 22:29:22 +0200 X-MIMETrack: Serialize by Router on www/seitenbau(Release 8.5HF467 | May 15, 2009) at 10/01/2010 22:29:22 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org Thomas Vandahl wrote: > On 01.10.10 21:47, Thomas Fischer wrote: > > In my experience, it is no problem if you keep that fact in mind. It just > > makes the code non-portable to another database (you only query for not > > null and know it's also not empty in oracle, but not dor other databases). > > Is it a problem for yaou if "" and null get mapped to the same value ? > > Unfortunately it is. The XML processing is different for these cases. > Suggestions are welcome. Patch it in the template to some strange value? > Other ideas? I do not understand the problem well enough (perhaps you can provide a little code example ?) but what you could do is to use the first characte of the String in the database as a flag: "N" for null and "O" for other (not null). You can overwrite the setters and getters such that they add and remove the flag automatically. You could use the template override mechanism in Torque4 to do this with minimum impact. There is a similar example in the torque4 test project (use the overrideConfigDir to override certain template settings). If you look at it and there is not enough documentation just open a jira issue. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org