2525import org .apache .cayenne .di .Inject ;
2626import org .apache .cayenne .exp .parser .ASTIn ;
2727import org .apache .cayenne .exp .parser .ASTList ;
28+ import org .apache .cayenne .exp .parser .ASTNotIn ;
2829import org .apache .cayenne .exp .parser .SimpleNode ;
2930import org .apache .cayenne .query .ObjectSelect ;
3031import org .apache .cayenne .runtime .CayenneRuntime ;
3435import org .apache .cayenne .unit .di .runtime .CayenneProjects ;
3536import org .apache .cayenne .unit .di .runtime .RuntimeCase ;
3637import org .apache .cayenne .unit .di .runtime .UseCayenneRuntime ;
37- import org .junit .Ignore ;
3838import org .junit .Test ;
3939
4040import java .util .ArrayList ;
@@ -173,7 +173,6 @@ public void testInEmpty() {
173173 }
174174
175175 @ Test
176- @ Ignore ("see https://issues.apache.org/jira/browse/CAY-2860" )
177176 public void testExplicitInEmpty () {
178177 Artist a1 = context .newObject (Artist .class );
179178 a1 .setArtistName ("Picasso" );
@@ -184,6 +183,18 @@ public void testExplicitInEmpty() {
184183 assertTrue (artists .isEmpty ());
185184 }
186185
186+ @ Test
187+ public void testExplicitNotInEmpty () {
188+ Artist a1 = context .newObject (Artist .class );
189+ a1 .setArtistName ("Picasso" );
190+ context .commitChanges ();
191+
192+ ASTNotIn notIn = new ASTNotIn ((SimpleNode ) Artist .ARTIST_NAME .getExpression (), new ASTList (List .of ()));
193+ List <Artist > artists = ObjectSelect .query (Artist .class , notIn ).select (context );
194+ assertEquals (1 , artists .size ());
195+ assertEquals ("Picasso" , artists .get (0 ).getArtistName ());
196+ }
197+
187198 /**
188199 * We are waiting invalid SQL here:
189200 * data type of expression is not boolean in statement
0 commit comments