Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 5736 invoked from network); 7 Jan 2010 18:37:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jan 2010 18:37:10 -0000 Received: (qmail 361 invoked by uid 500); 7 Jan 2010 18:37:09 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 328 invoked by uid 500); 7 Jan 2010 18:37:09 -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 320 invoked by uid 99); 7 Jan 2010 18:37:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2010 18:37:09 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clinton.begin@gmail.com designates 209.85.221.194 as permitted sender) Received: from [209.85.221.194] (HELO mail-qy0-f194.google.com) (209.85.221.194) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2010 18:37:02 +0000 Received: by qyk32 with SMTP id 32so236863qyk.4 for ; Thu, 07 Jan 2010 10:36:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=CyDX9SKiA0FuDl9JGOE8eC16kqrXCfLwxV6KQjJ9xZ0=; b=Xv8hEVysBIWcE+iizPBqBZQz46oAO+LLseryQOqF6MWWp5SryfaLgfmOIyT5xOd6Df bK8d5vgQNxvmWWOHX0V3cUCxeMdnkVH1fiqHzXnFggbvPRmZyzj+qI9+zFujxhAGKn0D Pchvvqo57iU5XEuM9t6gXcO7VfCtAmWlvgfP0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=UIkLLZ7MH4iXrDsZUWY3cn33byv2uWG4tLPgjflPz/A4pNYgqUmKeX0MoCFVcpZtnN 34tSt8Fgmit/YQ7j+JJY1WMP5sk0Zx+2pWg3/FaklQXt3kn9KrVvcH6OZ+FOfRYuCgCi aGK6+dxz0cNE9BAHorSBDW74P0clytMEeze3E= MIME-Version: 1.0 Received: by 10.224.18.23 with SMTP id u23mr13845713qaa.381.1262889401677; Thu, 07 Jan 2010 10:36:41 -0800 (PST) In-Reply-To: <4B45F9C8.20306@odinium.com> References: <4B45F9C8.20306@odinium.com> Date: Thu, 7 Jan 2010 11:36:41 -0700 Message-ID: <16178eb11001071036m7d2a06a6k37931e6921fb9ed6@mail.gmail.com> Subject: Re: Ibatis3 - select with ResultMapper behavior From: Clinton Begin To: user-java@ibatis.apache.org Content-Type: text/plain; charset=ISO-8859-1 I'm not sure I understand. Can you provide a few lines of code to demonstrate? On 2010-01-07, Roy Bailey wrote: > Hi, I've been using Ibatis2 for the last couple of years - great job, > and thanks. > > I'm now trying out Ibatis3 and have seen the following behavior: > > When I call a selectList query with a ResultMapper it works, but when I > call it with an SQLSession that has already called this query without a > ResultMapper it doesn't. It looks like the sql-session is caching the > default result-mapper on the first call and then ignoring the passed > result-mapper on the second call. > > I can work around this by using different sql-sessions, but thought you > might like to know as it had me confused for a time. If this is correct > behavior then it might be as well to throw an exception when the second > call with a ResultMapper is executed to tell the user this sql-session > already has a mapper. Alternatively, on the calls with a passed > result-mapper, you may be able to keep the original result-mapper in a > local variable, overwrite this default with the passed value, perform > the query, then restore the original result-mapper. That way multiple > calls with/without result-mappers would continue to work as expected > from a single sql-session? > > regards... > Roy > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > For additional commands, e-mail: user-java-help@ibatis.apache.org > > -- Sent from my mobile device --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org