realm-java icon indicating copy to clipboard operation
realm-java copied to clipboard

Link sort

Open cornflakes opened this issue 11 years ago • 51 comments

It would be great to have the posibility to sort on a Link.

ie.: RealmResults fooRealmResults = realm.where(Foo.class).("bar.startTimeStamp", start).findAll(); fooRealmResults.sort("bar.startTimeStamp");

cornflakes avatar Dec 13 '14 23:12 cornflakes

Absolutely - thanks for the suggestion!

bmunkholm avatar Dec 14 '14 21:12 bmunkholm

+1 from http://stackoverflow.com/questions/31435374/realm-findallsorted-by-field-of-a-filed

beeender avatar Jul 16 '15 03:07 beeender

:+1: :)

jlnquere avatar Aug 12 '15 08:08 jlnquere

:+1: :smiley:

draskosaric avatar Jan 04 '16 13:01 draskosaric

+1

tgbarker avatar Jan 12 '16 09:01 tgbarker

:+1:

WesleyBuck avatar Feb 09 '16 09:02 WesleyBuck

+1

In my case, I wish to retrieve a list of A sorted by A.date with its childs sorted by B.date, where:

Class A {
    int id;
    Date date;
    RealmList<B> bList;
}
Class B {
    int id;
    Date date;
}

Example query:

RealmResults<A> results= realm.where(A.class)
   .findAllSorted(new String[]{"date", "bList.date"}, new Sort[]{Sort.ASCENDING, Sort.ASCENDING});

viniciusam avatar Feb 19 '16 18:02 viniciusam

+1

nealsanche avatar Mar 07 '16 20:03 nealsanche

+1 as well. I have a lot of redundant fields that duplicates data in their children for sorting purposes. Updating all these values is a bit of a pain.

cioraneanu avatar May 26 '16 13:05 cioraneanu

+1

mmlii avatar Jun 02 '16 05:06 mmlii

+15 from #709

cmelchior avatar Jun 02 '16 07:06 cmelchior

@cmelchior is there any timeline for this or a recommended workaround? I have a similar case where i have an array of child objects with a date property, thanks.

johnryan avatar Jun 06 '16 19:06 johnryan

:+1: I'm currently in the process of migrating an app from SQLite to Realm and I was kind of expecting that this would work. Since it doesn't I'm currently a bit stuck and need to wait till this is implemented. Any news on this? Is this being worked on? Thanks!

taltstidl avatar Jun 28 '16 16:06 taltstidl

+1

kmenager avatar Jun 30 '16 09:06 kmenager

+1

alexanderbratusenko avatar Jul 07 '16 12:07 alexanderbratusenko

+1

jesusmartinoza avatar Jul 12 '16 18:07 jesusmartinoza

+1 this is really important - do you guys know when this is scheduled in for? Need to know whether I should wait, or implement a workaround now.

kieranmchall avatar Jul 22 '16 13:07 kieranmchall

+1

alexandrahably avatar Jul 25 '16 09:07 alexandrahably

+1

blork avatar Jul 25 '16 11:07 blork

+1

cognitivim avatar Aug 12 '16 10:08 cognitivim