You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2016/11/07 09:48:59 UTC
[jira] [Resolved] (CAMEL-10443) findById does not work with
ObjectId
[ https://issues.apache.org/jira/browse/CAMEL-10443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-10443.
---------------------------------
Resolution: Fixed
Assignee: Claus Ibsen
> 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
> Assignee: Claus Ibsen
> 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)