[
https://issues.apache.org/activemq/browse/CAMEL-1596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51613#action_51613
]
Claus Ibsen commented on CAMEL-1596:
------------------------------------
The code example should now be:
{code}
from("xxx")
.to("ibatis:selectOrderById?statementType=QueryForObject")
.to("bean:handleOrder")
{code}
So we instruct ibatis to invoke its QueryForObject method that returns a single
object. Then we can pass in a message with the body of the ID to select such as
{code}
template.sendBody("xxx", 123);
{code}
> camel-ibatis - Option to control the iBatis operation used so we can use it
> like camel-jdbc or camel-sql
> --------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-1596
> URL: https://issues.apache.org/activemq/browse/CAMEL-1596
> Project: Apache Camel
> Issue Type: New Feature
> Components: camel-ibatis
> Affects Versions: 1.6.0, 2.0-M1
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 1.6.1, 2.0.0
>
>
> In a route like this
> {code}
> from("xxx")
> .to("ibatis:selectOrderById")
> .to("bean:handleOrder")
> {code}
> Does not work as the current codebase expects to insert data when you produce
> data to it (or select all if body is null). This is kinda {{odd}} behavior.
> So what we need is a new option to specify which operation on SqlMapClient to
> invoke
> - queryForObject
> - queryForList
> - insert
> - update
> - delete
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.