Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6256B7557 for ; Tue, 30 Aug 2011 01:29:01 +0000 (UTC) Received: (qmail 99541 invoked by uid 500); 30 Aug 2011 01:29:01 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 99072 invoked by uid 500); 30 Aug 2011 01:29:00 -0000 Mailing-List: contact dev-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 dev@camel.apache.org Received: (qmail 99063 invoked by uid 99); 30 Aug 2011 01:29:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 01:29:00 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,NORMAL_HTTP_TO_IP,RP_MATCHES_RCVD,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Aug 2011 01:28:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 33E38D6A65 for ; Tue, 30 Aug 2011 01:28:38 +0000 (UTC) Date: Tue, 30 Aug 2011 01:28:38 +0000 (UTC) From: "Mathieu Lalonde (JIRA)" To: dev@camel.apache.org Message-ID: <83683866.5727.1314667718209.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1226043961.49023.1313670687181.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CAMEL-4350) Camel-jdbc with List has arbitrary column order 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-4350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mathieu Lalonde updated CAMEL-4350: ----------------------------------- Attachment: camel-jdbc_keyOrdering.tar Thanks for the encouragement Claus! :) The attached patch has a trivial code change (use LinkedHashMap) and adds a Test class (JdbcRouteKeyOrderingTest). Also added cautionary comments to JdbcRouteTest. > Camel-jdbc with List has arbitrary column order > ---------------------------------------------------- > > Key: CAMEL-4350 > URL: https://issues.apache.org/jira/browse/CAMEL-4350 > Project: Camel > Issue Type: Improvement > Components: camel-jdbc, camel-sql > Affects Versions: 2.7.1 > Environment: java 1.6 > Reporter: Julian Cable > Assignee: Mathieu Lalonde > Priority: Minor > Fix For: 2.9.0 > > Attachments: camel-jdbc_keyOrdering.tar > > > The following route works but the order of the columns is dependent on the natural ordering of the hashmap. Target systems will have an expectation of the order of the data. > > > > SELECT id, value1, value2 FROM mytable > > > > > > > Either there needs to be a property for csv that allows hash key ordering to be specified, or an option to sort the keys, e.g. > > > > SELECT id as col1, value1 as col2, value2 as col3 FROM mytable > > > > > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira