File tree Expand file tree Collapse file tree 2 files changed +13
-17
lines changed
ebean-core/src/test/java/io/ebeaninternal/server/core
ebean-test/src/test/java/org/tests/query Expand file tree Collapse file tree 2 files changed +13
-17
lines changed Original file line number Diff line number Diff line change 88import io .ebeaninternal .server .querydefn .DefaultOrmQuery ;
99import io .ebeaninternal .server .querydefn .OrmQueryDetail ;
1010import org .junit .jupiter .api .Test ;
11- import org .tests .model .basic .Building ;
12- import org .tests .model .basic .Clan ;
13- import org .tests .model .basic .ClanQuest ;
1411import org .tests .model .basic .Order ;
1512
1613import static org .assertj .core .api .Assertions .assertThat ;
@@ -345,20 +342,6 @@ public void test_filterMany_excludedExplicitly() {
345342 assertThat (detail .getFetchPaths ()).containsExactly ("customer" , "customer.contacts" );
346343 }
347344
348- @ Test
349- public void test_filterMany_excludedExplicitly2 () {
350- Query <ClanQuest > query = DB .find (ClanQuest .class )
351- .setId (1 )
352- .fetch ("clan" , "buildings" )
353- .filterMany ("clan.buildings" ).eq ("type" , Building .CAFE )
354- .query ();
355-
356- OrmQueryRequest <ClanQuest > queryRequest = OrmQueryRequestTestHelper .queryRequest (query );
357- OrmQueryDetail detail = queryRequest .query ().detail ();
358-
359- assertThat (detail .getFetchPaths ()).containsExactly ("clan" , "clan.buildings" );
360- }
361-
362345 private void assertSame (OrmQueryDetail detail1 , OrmQueryDetail detail2 ) {
363346 assertThat (hash (detail1 )).isEqualTo (hash (detail2 ));
364347 }
Original file line number Diff line number Diff line change 66import io .ebean .Query ;
77import io .ebean .test .LoggedSql ;
88import org .junit .jupiter .api .Test ;
9+ import org .tests .model .basic .Building ;
10+ import org .tests .model .basic .ClanQuest ;
911import org .tests .model .basic .Customer ;
1012import org .tests .model .basic .Order ;
1113import org .tests .model .basic .ResetBasicData ;
@@ -230,6 +232,17 @@ public void test_with_findOneOrEmpty() {
230232 assertThat (customer ).isPresent ();
231233 }
232234
235+ @ Test
236+ public void test_filterMany_excludedExplicitly () {
237+ Optional <ClanQuest > quest = DB .find (ClanQuest .class )
238+ .setId (1 )
239+ .fetch ("clan" , "buildings" )
240+ .filterMany ("clan.buildings" ).eq ("type" , Building .CAFE )
241+ .findOneOrEmpty ();
242+
243+ assertThat (quest ).isAbsent ();
244+ }
245+
233246 @ Test
234247 public void test_filterMany_with_isNotEmpty () {
235248
You can’t perform that action at this time.
0 commit comments