Re: Possibility of jdbc component when performing a select to return a map

2015-03-24 Thread angelo.rlcosta
Thanks alot Antoine. Best Regards, Ângelo Costa On Mon, Mar 23, 2015 at 9:57 AM, Antoine DESSAIGNE [via Camel] ml-node+s465427n5764632...@n5.nabble.com wrote: Hi Angelo, First in groovy you don't need to explicitly call the 'get' method on Maps. Second, you'll have to use the exchange

Re: Possibility of jdbc component when performing a select to return a map

2015-03-23 Thread Antoine DESSAIGNE
Hi Angelo, First in groovy you don't need to explicitly call the 'get' method on Maps. Second, you'll have to use the exchange in order to access properties in groovy. Here what you need to do : groovyrequest.body[exchange.properties['currentCode']]/groovy Have a nice day, Antoine. 2015-03-17

Re: Possibility of jdbc component when performing a select to return a map

2015-03-17 Thread angelo.rlcosta
Hello Antoine, Your solution worked perfectly. Thanks alot! Cheers Ângelo Costa On Mon, Mar 16, 2015 at 5:50 PM, Antoine DESSAIGNE [via Camel] ml-node+s465427n5764229...@n5.nabble.com wrote: Hi, No, it's not possible. In order to be unique in your Map it has to know which fields are

Re: Possibility of jdbc component when performing a select to return a map

2015-03-17 Thread angelo.rlcosta
Hello again Antoine, The previous groovy expression worked well. Thanks. How can i pass camel property inside groovy context. For example if i define a property setProperty propertyName=currentCode simple100/simple /setProperty How can i use this property inside

Possibility of jdbc component when performing a select to return a map

2015-03-16 Thread angelo.rlcosta
HI Guys, i'm using jdbc component to perform a selectList. I've noticed that according to the impl it returns a ListMaplt;String, Object data = extractResultSetData(rs); Is there any type of transformation i can perform to have data like MapString, Maplt;String, Object so instead of a List i

Re: Possibility of jdbc component when performing a select to return a map

2015-03-16 Thread Antoine DESSAIGNE
Hi, No, it's not possible. In order to be unique in your Map it has to know which fields are part of key (assuming that you retrieve them all). If you have camel-groovy in your project you can do the following: to(jdbc:something).setBody(new GroovyExpression(request.body.collectEntries