[JAVA-431] the find() method of GridFS should allow specification of sort criteria Created: 08/Sep/11  Updated: 19/Mar/13  Resolved: 23/Jan/13

Status: Closed
Project: Java Driver
Component/s: GridFS
Affects Version/s: None
Fix Version/s: 2.11.0

Type: New Feature Priority: Major - P3
Reporter: Frank Wen Assignee: Unassigned
Resolution: Done Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

the method:
public List<GridFSDBFile> find(DBObject query)
of GridFS can't be sorted now.
It will be great if I can get the list order by some other attribute, not only filename.



 Comments   
Comment by Jeffrey Yemin [ 23/Jan/13 ]

Merged https://github.com/mongodb/mongo-java-driver/pull/88

Comment by auto [ 23/Jan/13 ]

Author:

{u'date': u'2013-01-23T02:22:26Z', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: Merge pull request #88 from phil-schneider/JAVA-431-GridFS-Sorting

JAVA-431, JAVA-703: the find() method of GridFS should can be sorted. Cursor should be closed in a finally block.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/8c6562a85421647f63e168bd4d62452e1e336ce7

Comment by auto [ 23/Jan/13 ]

Author:

{u'date': u'2013-01-23T02:22:26Z', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

Message: Merge pull request #88 from phil-schneider/JAVA-431-GridFS-Sorting

JAVA-431, JAVA-703: the find() method of GridFS should can be sorted. Cursor should be closed in a finally block.
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/8c6562a85421647f63e168bd4d62452e1e336ce7

Comment by auto [ 23/Jan/13 ]

Author:

{u'date': u'2013-01-16T17:48:53Z', u'name': u'Philipp', u'email': u'github-commit@phil-schneider.de'}

Message: JAVA-431 the find() method of GridFS should can be sorted

Comment by auto [ 23/Jan/13 ]

Author:

{u'date': u'2012-11-28T15:17:59Z', u'email': u'github-commit@phil-schneider.de', u'name': u'Philipp'}

Message: JAVA-431 the find() method of GridFS should can be sorted
JAVA-703 GridFS List<GridFSDBFile> find( DBObject query ,...) should close cursor

Comment by auto [ 23/Jan/13 ]

Author:

{u'date': u'2012-11-28T14:59:31Z', u'email': u'github-commit@phil-schneider.de', u'name': u'Philipp'}

Message: JAVA-431 the find() method of GridFS should can be sorted

Comment by Philipp Schneider [ 16/Jan/13 ]

I added the requested test in the github pullrequest.

Comment by Philipp Schneider [ 11/Dec/12 ]

Any chance of a fix version here?
I mean the solution is already there, you just have to pull & check it.

Comment by Philipp Schneider [ 28/Nov/12 ]

I provided a simple solution for this issue:
https://github.com/mongodb/mongo-java-driver/pull/88

There is a depending issue on this:
https://jira.springsource.org/browse/DATAMONGO-534

It would be nice if you could include this in one of the next releases. Thanks

Generated at Thu Feb 08 08:52:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.