Home > database >  Doubt ExampleMatcher MongoRepository usage. WithIncludeNullValues
Doubt ExampleMatcher MongoRepository usage. WithIncludeNullValues

Time:10-17

Entity: ` code `, ` tags `... Many columns such as
The code data for 1, 100; Code is 1, tags... Such as empty data have 10
Roughly as follows

 

ExampleMatcher ExampleMatcher=ExampleMatcher. MatchingAll (.) withIncludeNullValues ();
The Entity, the Entity=Entity. The builder (). Code (" 1 "). The build ();
Example Example=example of (entity, exampleMatcher);
List All=entityRepository. The.findall (example);
System. The out. Println (all size ());//print 100, want to query is 10


want to query code is 1, tags... Such as empty data (a total of 10)
However the query results for the code of 1 100
Save the children.
  • Related