[
https://issues.apache.org/jira/browse/CAMEL-10443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15639599#comment-15639599
]
ASF GitHub Bot commented on CAMEL-10443:
----------------------------------------
GitHub user nickbusy opened a pull request:
https://github.com/apache/camel/pull/1251
CAMEL-10443: fixing findById with ObjectId
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/nickbusy/camel CAMEL-10443
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1251.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1251
----
commit 8f9ab2dbab7ec6296472f6516b71e1b1af6f1d9b
Author: Nick Busy <[email protected]>
Date: 2016-11-05T13:04:05Z
CAMEL-10443: fixing findById with ObjectId
----
> findById does not work with ObjectId
> ------------------------------------
>
> Key: CAMEL-10443
> URL: https://issues.apache.org/jira/browse/CAMEL-10443
> Project: Camel
> Issue Type: Bug
> Components: camel-mongodb
> Affects Versions: 2.18.0
> Reporter: Nick Busy
> Priority: Minor
> Fix For: 2.18.1, 2.19.0
>
>
> When using Camel MongoDB component with "operation=findById" and [_id] field
> is happened to be a standard ObjectId(), it doesn't work anymore in v.2.18
> (worked 2.17.3 and before).
> Basically, to test you'd need to send org.bson.types.ObjectId in the message
> body but it never finds a document.
> The problem lies in MongoDbProducer.createDoFindById().
> Can be fixed by replacing line:
> String id = exchange1.getIn().getMandatoryBody(String.class);
> with
> Object id = exchange1.getIn().getMandatoryBody();
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)