DATACOUCH-276 Dont escape the order by property as a whole
Escape each nested level and concatenate with a period Original pull request: #141.
This commit is contained in:
@@ -147,4 +147,14 @@ public class N1qlUtilsTest {
|
||||
|
||||
assertEquals(expected, real);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOrderByWithNestedField() throws Exception {
|
||||
CouchbaseConverter converter = mock(CouchbaseConverter.class);
|
||||
com.couchbase.client.java.query.dsl.Sort[] realSort =
|
||||
N1qlUtils.createSort(new Sort("party.attendees"), converter);
|
||||
|
||||
assertEquals("`party`.`attendees` ASC", realSort[0].toString());
|
||||
verifyZeroInteractions(converter);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user