Author: michiel Date: 2010-03-23 11:49:04 +0100 (Tue, 23 Mar 2010) New Revision: 41571
Modified: mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/util/Queries.java Log: add some 'sortUniquely' which fixed a small bug occuring when more than one similar relation between two nodes exist Modified: mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/util/Queries.java =================================================================== --- mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/util/Queries.java 2010-03-23 10:34:47 UTC (rev 41570) +++ mmbase/branches/MMBase-1_9/core/src/main/java/org/mmbase/bridge/util/Queries.java 2010-03-23 10:49:04 UTC (rev 41571) @@ -1140,6 +1140,7 @@ public static NodeList getRelatedNodes(Node node, NodeManager otherNodeManager, String role, String direction, String relationFields, String sortOrders) { NodeQuery q = Queries.createRelatedNodesQuery(node, otherNodeManager, role, direction); Queries.addRelationFields(q, role, relationFields, sortOrders); + sortUniquely(q); return q.getCloud().getList(q); } @@ -1997,6 +1998,7 @@ NodeQuery clone = (NodeQuery) q.clone(); Queries.addSortedFields(clone); + Queries.sortUniquely(clone); Transaction t = (Transaction) startNode.getCloud(); _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs