| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Problems with sorting datas with db4o using orderderAscending or or derDescending functions
Hi,
I have created an object called result with several attributes. Then I
have inserted approximately 10 000 object.
I can get the data and display them but I'd like to know if it is
possible, using db4o's functions, to create a request which enable to
sort initially by name (of String type) and, then, to sort by num (int
type).
I have tried for example the following code :
Query query = db.query();
query.constrain(Result.class);
query.descend("name").orderDescending();
query.descend("num").orderDescending(); ObjectSet result1 = query.execute();
It works nearly successfully but the data sometimes are not correctly
sorted. Is it a this bug in the functions or is the code not correct?
In the last case, would it be possible to have a correct example ?
How to solve this problem?
Thanks in advance
AC Received on Tue Dec 06 2005 - 03:02:58 CST
![]() |
![]() |