Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C72E11042A for ; Fri, 2 Aug 2013 20:03:48 +0000 (UTC) Received: (qmail 58306 invoked by uid 500); 2 Aug 2013 20:03:48 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 58278 invoked by uid 500); 2 Aug 2013 20:03:48 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 58268 invoked by uid 99); 2 Aug 2013 20:03:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Aug 2013 20:03:48 +0000 Date: Fri, 2 Aug 2013 20:03:48 +0000 (UTC) From: "Zemian Deng (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CAMEL-6366) SQL component - Add option to dictate if output is list, object or map MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-6366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13728007#comment-13728007 ] Zemian Deng edited comment on CAMEL-6366 at 8/2/13 8:02 PM: ------------------------------------------------------------ Hi Claus, Thanks for the feedback. I added the feature with the assumption that you want something already provided by Spring's JdbcTemplate RowMapper provided. Because underneath camel-sql we are already using JdbcTemplate to query data. Currently the outputType=Object will actually map to an object/bean and auto populate setters from each column using a BeanPropertyRowMapper. I thought it's quiet useful to have this option for user to auto converted a query result to list of user objects. Anyhow, let me read up little more on mybatis impl and then see if I can fully understand what exactly is that you are asking for here. As of now, I am a bit confused. :) was (Author: saltnlight5): Hi Claus, Thanks for the feedback. I added the feature with the assumption that you want something already provided by Spring's JdbcTemplate RowMapper provided. Because underneath camel-sql we are already using JdbcTemplate to query data. Currently the outputType=Object will actually map to an object/bean and auto populate setters from each column using a BeanPropertyRowMapper. Anyhow, let me read up little more on mybatis impl and then see if I can fully understand what exactly is that you are asking for here. As of now, I am a bit confused. :) > SQL component - Add option to dictate if output is list, object or map > ---------------------------------------------------------------------- > > Key: CAMEL-6366 > URL: https://issues.apache.org/jira/browse/CAMEL-6366 > Project: Camel > Issue Type: Improvement > Components: camel-sql > Reporter: Claus Ibsen > Fix For: 2.12.0 > > Attachments: CAMEL-6366.patch > > > When using the sql component, the output is always a List. > It would be nice if you could configure an option to say its a > - selectForObject > - selectForList > - selectForMap > Like MyBatis can do. > Also we can consider having a way to store the output on a header instead of altering the body. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira