I am using Spring Data MongoDB and I use the method
findAll(Example example, Pageable pageable)
of the QueryByExampleExecutor
interface, to get all the entries in a collection. The problem is that I'm not receiving all the results. I have 16 entries, and there are 18 entries. I noticed that the two entries that are not retrieved, do not have _class
attribute in the database. If I use the standard method
findAll(Pageable pageable)
I can get all the results.
My object example, is built in the following way. The student object that I add has all the fields to null
, my pageable object is page = 0 with size = Integer.MAX_VALUE.
I need to use the first method. Any ideas about why the method findAll
of Example can not get all the entries? Is it because of the _class?