Skip to content

Commit 5dc311b

Browse files
committed
CAY-2906 In-memory evaluation of (not) exists expressions
1 parent b64f1d6 commit 5dc311b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

cayenne/src/test/java/org/apache/cayenne/exp/parser/ASTExistsIT.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,15 @@ public void testEvaluateInMemoryExistsExpression() {
117117
}
118118

119119
private void doEvaluateNoQuery(Expression exp) {
120-
List<Artist> artistSelected = ObjectSelect.query(Artist.class, exp).select(context);
120+
List<Artist> artistSelected = ObjectSelect.query(Artist.class, exp)
121+
.orderBy(Artist.ARTIST_ID_PK_PROPERTY.asc())
122+
.select(context);
121123

122124
List<Artist> artists = ObjectSelect.query(Artist.class)
123125
.prefetch(Artist.PAINTING_ARRAY.disjoint())
124126
.prefetch(Artist.PAINTING_ARRAY.dot(Painting.TO_PAINTING_INFO).disjoint())
125127
.prefetch(Artist.PAINTING_ARRAY.dot(Painting.TO_GALLERY).disjoint())
128+
.orderBy(Artist.ARTIST_ID_PK_PROPERTY.asc())
126129
.select(context);
127130

128131
queryInterceptor.runWithQueriesBlocked(() -> {
@@ -138,6 +141,7 @@ private void doEvaluateWithQuery(Expression exp) {
138141
.prefetch(Artist.PAINTING_ARRAY.disjoint())
139142
.prefetch(Artist.PAINTING_ARRAY.dot(Painting.TO_PAINTING_INFO).disjoint())
140143
.prefetch(Artist.PAINTING_ARRAY.dot(Painting.TO_GALLERY).disjoint())
144+
.orderBy(Artist.ARTIST_ID_PK_PROPERTY.asc())
141145
.select(context);
142146

143147
List<Artist> artistsFiltered = exp.filterObjects(artists);

0 commit comments

Comments
 (0)