camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CAMEL-10443) findById does not work with ObjectId
Date Sat, 05 Nov 2016 13:06:58 GMT


ASF GitHub Bot commented on CAMEL-10443:

GitHub user nickbusy opened a pull request:

    CAMEL-10443: fixing findById with ObjectId


You can merge this pull request into a Git repository by running:

    $ git pull CAMEL-10443

Alternatively you can review and apply these changes as the patch at:

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 <>
Date:   2016-11-05T13:04:05Z

    CAMEL-10443: fixing findById with ObjectId


> findById does not work with ObjectId
> ------------------------------------
>                 Key: CAMEL-10443
>                 URL:
>             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

View raw message