paintingHelper.insert(33001, 33001, "P1");
paintingHelper.insert(33002, 33002, "P2");
SelectQuery missingToManyQuery = new SelectQuery(Artist.class);
missingToManyQuery.andQualifier(Expression.fromString("paintingArray+ = null"));
missingToManyQuery.addOrdering(Artist.ARTIST_NAME_PROPERTY, SortOrder.ASCENDING);
List<Artist> artists = context.performQuery(missingToManyQuery);
assertEquals(2, artists.size());
assertEquals("BB1", artists.get(0).getArtistName());