Hi again. I could reproduce a NullPointer exception when I specified a not existing field in the order clause. Have you checked that the '_rating' field really exists?
Anyway, created a bug-entry for that issue: http://tracker.db4o.com/browse/COR-2216 On Jul 8, 5:48 pm, Gamlor <gamlerh...@gmail.com> wrote: > Hi. > > I couldn't reproduce the issue. Which version of db4o are you using? > > On Jun 10, 1:41 pm, imran ali <imran...@gmail.com> wrote: > > > > > Hi all, > > I have been using db4o in my project,i have to search result and > > arrange in Descending order according to particular filed. I follow > > below code, but am getting null value. > > > public List<Recipe> getRecipiesByString(String searchValue) > > { > > List<Recipe> list=null; > > Query query=db().query(); > > query.constrain(Recipe.class); > > Constraint constraint= > > query.descend("_title").constrain(searchValue).contains(); > > > query.descend("_description").constrain(searchValue).contains().or(constraint); > > > query.descend("_rating").orderDescending(); > > > list= query.execute(); > > return list; > > } > > I have Class Recipe there, "_title" & "_description" are string fields > > and "_rating" is double type field. > > > when i try to do in descending order with the fields "_rating", it has > > been giving null value, > > and after comment of this line > > query.descend("_rating").orderDescending(); > > then value is coming properly. > > > what is solution to get result in Desceding order according to > > "_rating". -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en