diff --git a/src/helma/objectmodel/Relation.java b/src/helma/objectmodel/Relation.java index e1ed0b92..ef6d3bb3 100644 --- a/src/helma/objectmodel/Relation.java +++ b/src/helma/objectmodel/Relation.java @@ -246,7 +246,9 @@ public class Relation { throw new RuntimeException ("getGroupbyPropertyRelation called on non-group-by relation"); if (filter != null) return filter; - return new Relation (other, localField, remoteField, direction, true); + Relation vr = new Relation (other, localField, remoteField, direction, true); + vr.order = order; + return vr; } /** @@ -255,7 +257,9 @@ public class Relation { public Relation getGroupbyPropertyRelation () { if (groupby == null) throw new RuntimeException ("getGroupbyPropertyRelation called on non-group-by relation"); - return new Relation (other, localField, remoteField, direction, true); + Relation vr = new Relation (other, localField, remoteField, direction, true); + vr.order = order; + return vr; }