camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: SQL Component parameter order?
Date Tue, 06 Mar 2012 08:16:34 GMT
Hi

No it doesnt support a map so you can have a keyed based lookup.
It could possible be a good additon, to allow you to specify the key
name enclosed by # tokens, such as

So you can do something a like:
insert into foo (title, amount) values (#title#, #amount#)

Fell free to create a JIRA ticket in the issue tracker
http://camel.apache.org/support.html


An alternative is to look at MyBatis, its really good for these kind
of SQL mapping
http://camel.apache.org/mybatis
http://mybatis.org/


On Mon, Mar 5, 2012 at 5:28 PM, dunnlow <dunnlow@yahoo.com> wrote:
> I have an application that stores a POJO to a database.  I read the attribute
> values from a variety of sources (JMS and XML File).  I have been using a
> bean processor to construct the insert statement which I pass to my jdbc
> endpoint.  This has been working, but now I need to insert more complex
> (HTML) values into an oracle database.  The SQL component seems like is
> would be a good option, however, from my reading it looks like I need an
> ordered list that is directly mapped to the SQL parameters.  This seems
> terribly fragile -- that if database field order changes everything brakes.
> Is there a smart way to handle this problem without adding that dependency
> on database field order?
>
> Thanks for any thoughts,
> -J
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/SQL-Component-parameter-order-tp5538064p5538064.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message