[ 
https://issues.apache.org/jira/browse/NIFI-4759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16329444#comment-16329444
 ] 

ASF subversion and git services commented on NIFI-4759:
-------------------------------------------------------

Commit ca54186b608682d028719ae836bd8d8f83fd24d7 in nifi's branch 
refs/heads/master from [~mike.thomsen]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=ca54186 ]

NIFI-4759 - Fixed a bug that left a hard-coded reference to _id in as the 
update key for MongoDB upserts.

Signed-off-by: Pierre Villard <pierre.villard...@gmail.com>

This closes #2401.


> PutMongo does not handle updateKey field correctly
> --------------------------------------------------
>
>                 Key: NIFI-4759
>                 URL: https://issues.apache.org/jira/browse/NIFI-4759
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Mike Thomsen
>            Assignee: Mike Thomsen
>            Priority: Major
>
> Two issues:
> * The updateKey field is ignored in favor of _id in the update code block of 
> PutMongo.
> * _id fields are always treated as strings, even if they're valid ObjectIds 
> represented as a string. PutMongo should be able to handle these as ObjectIds.
> Regarding the first point, this works:
> {code:java}
> {
>     "_id": "1234",
>     "$set": { "msg": "Hello, world" }
> }
> {code}
> This does not:
> {code:java}
> {
>     "uniqueKey": "12345",
>     "$set": { "msg": "Hello, World" }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to