camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kris Boutilier (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-10019) camel-mongodb - Consider sortBy header when performing findOneByQuery operation
Date Tue, 07 Jun 2016 02:15:21 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-10019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kris Boutilier updated CAMEL-10019:
-----------------------------------
     Affects Version/s:     (was: 2.17.1)
                        2.18.0
    External issue URL: https://github.com/apache/camel/pull/1017  (was: https://github.com/apache/camel/pull/1013)
         Fix Version/s:     (was: 2.17.2)
                            (was: 2.18.0)
           Description: This patch implements the same improvement as CAMEL-10023 in a manner
that cleanly applies to the refactored camel-mongodb in master  (was: There is a often a requirement
to fetch the min/max record from Mongo based on a particular field. Typically the operation
is performed using syntax similar to:

 db.collection.find().sort({_id: -1}).limit(1)
or

 db.collection.findOne({$query:{},$orderby:{_id:-1}})
As implemented the findOneByQuery operation currently ignores the sortBy header. This trivial
patch passes sortBy to the sort parameter of findOne(), if set.

Helpfully, if the projection parameter is null findOne() returns all fields, so the state
of fieldFilter is not checked before passing when the sortBy header has been set.)

> camel-mongodb - Consider sortBy header when performing findOneByQuery operation
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-10019
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10019
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mongodb
>    Affects Versions: 2.18.0
>            Reporter: Kris Boutilier
>            Priority: Trivial
>
> This patch implements the same improvement as CAMEL-10023 in a manner that cleanly applies
to the refactored camel-mongodb in master



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message