diff --git a/Neo4jClient.Tests/Cypher/CypherFluentQueryTests.cs b/Neo4jClient.Tests/Cypher/CypherFluentQueryTests.cs index 6a0237a81..44c896e67 100644 --- a/Neo4jClient.Tests/Cypher/CypherFluentQueryTests.cs +++ b/Neo4jClient.Tests/Cypher/CypherFluentQueryTests.cs @@ -297,7 +297,7 @@ public void OrderNodesByMultiplePropertiesDescending() // http://docs.neo4j.org/chunked/stable/query-order.html#order-by-order-nodes-in-descending-order // START n=node(3,1,2) // RETURN n - // ORDER BY n.age, n.name DESC + // ORDER BY n.age DESC, n.name DESC var client = Substitute.For(); var query = new CypherFluentQuery(client) @@ -305,7 +305,7 @@ public void OrderNodesByMultiplePropertiesDescending() .OrderByDescending("n.age", "n.name") .Query; - Assert.AreEqual("RETURN n\r\nORDER BY n.age, n.name DESC", query.QueryText); + Assert.AreEqual("RETURN n\r\nORDER BY n.age DESC, n.name DESC", query.QueryText); Assert.AreEqual(0, query.QueryParameters.Count); } diff --git a/Neo4jClient/Cypher/CypherFluentQuery.cs b/Neo4jClient/Cypher/CypherFluentQuery.cs index 93a2cd3ef..e1f06661b 100644 --- a/Neo4jClient/Cypher/CypherFluentQuery.cs +++ b/Neo4jClient/Cypher/CypherFluentQuery.cs @@ -348,7 +348,7 @@ public ICypherFluentQuery OrderBy(params string[] properties) public ICypherFluentQuery OrderByDescending(params string[] properties) { return Mutate(w => - w.AppendClause(string.Format("ORDER BY {0} DESC", string.Join(", ", properties)))); + w.AppendClause(string.Format("ORDER BY {0} DESC", string.Join(" DESC, ", properties)))); } public CypherQuery Query diff --git a/Neo4jClient/Cypher/CypherFluentQuery`TResult.cs b/Neo4jClient/Cypher/CypherFluentQuery`TResult.cs index 21d59dba0..9b6a5a77e 100644 --- a/Neo4jClient/Cypher/CypherFluentQuery`TResult.cs +++ b/Neo4jClient/Cypher/CypherFluentQuery`TResult.cs @@ -41,7 +41,7 @@ public CypherFluentQuery(IGraphClient client, QueryWriter writer) public new ICypherFluentQuery OrderByDescending(params string[] properties) { return Mutate(w => - w.AppendClause(string.Format("ORDER BY {0} DESC", string.Join(", ", properties)))); + w.AppendClause(string.Format("ORDER BY {0} DESC", string.Join(" DESC, ", properties)))); } public IEnumerable Results