
|
If you were logged in you would be able to see more operations.
|
|
|
Tiny Marbles
Created: 20/Nov/06 12:08 Central European Time
Updated: 06/Mar/07 17:26 Central European Time
|
|
| Component/s: |
Filters and Queries
|
| Affects Version/s: |
None
|
| Fix Version/s: |
0.9.5
|
|
|
Original Estimate:
|
Unknown
|
Remaining Estimate:
|
Unknown
|
Time Spent:
|
Unknown
|
|
Issue Links:
|
Cause
|
|
This issue causes:
|
|
TM-282
Finish refactoring of the CriteriaQue...
|
|
|
|
|
Precedence
|
|
This issue must be done before:
|
|
MUM-11
Sorting in the list
|
|
|
 |
CMS-67
List all articles: sorting result
|
|
|
|
CMS-68
List all versions: sorting result
|
|
|
|
|
Related
|
|
This issue relates to:
|
|
TM-283
Fail when PType.put() is called using...
|
|
|
|
|
This issue is related with:
|
|
TM-306
Coverage tests for sorter elements
|
|
|
|
|
|
|
We need to be able to sort results by attribute value. I think an API like this could work:
List<PObject> users = repository.createFilter("User")
.like("name", "a%")
.orderBy("name")
.list();
Maybe a better API would be sortAsc and sortDesc. The following example would sort first by release date, newest first, then by title, alphabetically:
List<PObject> objects = repository.createFilter("Songs")
.in("tags", "rock")
.sortDesc("releaseDate")
.sortAsc("title")
.list();
Since we are using the Criteria API from Hibernate under the hood, we can transfer the same semantics.
|
|
Description
|
We need to be able to sort results by attribute value. I think an API like this could work:
List<PObject> users = repository.createFilter("User")
.like("name", "a%")
.orderBy("name")
.list();
Maybe a better API would be sortAsc and sortDesc. The following example would sort first by release date, newest first, then by title, alphabetically:
List<PObject> objects = repository.createFilter("Songs")
.in("tags", "rock")
.sortDesc("releaseDate")
.sortAsc("title")
.list();
Since we are using the Criteria API from Hibernate under the hood, we can transfer the same semantics. |
Show » |
|