Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 58475 invoked from network); 23 Nov 2009 13:45:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Nov 2009 13:45:42 -0000 Received: (qmail 81875 invoked by uid 500); 23 Nov 2009 13:45:41 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 81834 invoked by uid 500); 23 Nov 2009 13:45:40 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 81826 invoked by uid 99); 23 Nov 2009 13:45:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 13:45:38 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [209.85.219.227] (HELO mail-ew0-f227.google.com) (209.85.219.227) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Nov 2009 13:45:30 +0000 Received: by ewy27 with SMTP id 27so1991048ewy.16 for ; Mon, 23 Nov 2009 05:45:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.87.69 with SMTP id x47mr1582526wee.97.1258983903957; Mon, 23 Nov 2009 05:45:03 -0800 (PST) Date: Mon, 23 Nov 2009 14:45:03 +0100 Message-ID: <6397d9cd0911230545v4b3cd9f9rae27d3f40ca584e1@mail.gmail.com> Subject: Problem with variable substitution and annotations From: =?ISO-8859-1?Q?Dominik_M=E4hl?= To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=0016e6d99f2c5f94cd04790a08ee X-Virus-Checked: Checked by ClamAV on apache.org --0016e6d99f2c5f94cd04790a08ee Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, we're currently evaluating iBatis 3 and found a possible bug: To call a sql function we have to resort to $ (replacement in the query) instead of parameters (#). If we do this in xml everything works as expected. If we define this in an annotation like this: @Select("select LIB.FUNCTION('${0}') from SYSIBM.SYSDUMMY1") we don't get an error but if we enable debug logging, the executed sql stil= l contains the ${0} and not the variable value. Is this a known bug? should I enter it in JIRA, or is it our fault? --=20 Dominik M=E4hl --0016e6d99f2c5f94cd04790a08ee Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

we're currently evaluating iBatis 3 and found a possible bug= :

To call a sql function we have to resort to $ (replacement in the = query) instead of parameters (#).

If we do this in xml everything w= orks as expected.

<select id=3D"getIt" parameterType=3D"string" re= sultType=3D"long">
=A0=A0=A0 =A0=A0=A0 select LIB.FUNCTION(= '${0}') from SYSIBM.SYSDUMMY1
=A0=A0=A0 </select>

If we define this in an annotation like this:
@Select("select LIB.FUNCTION('${0}') from SYSIBM.SYSDUMMY1&quo= t;)

we don't get an error but if we enable debug logging, the ex= ecuted sql still contains the ${0} and not the variable value.

Is th= is a known bug? should I enter it in JIRA, or is it our fault?

--
Dominik M=E4hl <emissa= ry@dsnine.com>
--0016e6d99f2c5f94cd04790a08ee--