2

I have a repository method like this

    @Query({'date': ?0})
    public List<Log> findForDate(LocalDate date);

and I am using it like this

repository.findForDate(LocalDate.now());

because I want to fetch my current log entries. Repo returns empty List. I enabled query logging and generated query looks like this

ReactiveMongoTemplate - find using query: { "date" : { "$eq" : { "$date" : -389232000000 } } }

Obviously this is not a correct query, because instead of a number -389232000000 I would expect formatted date String. What am I doing wrong?

pokemzok
  • 1,659
  • 1
  • 19
  • 29

0 Answers0