Very similar to this question: Check date between two other dates spring data jpa
However, I am attempting to do this with MongoDB and java.time.LocalDateTime
.
I have tried:
findAllByMetadataStartTimeBetween(start, end)
(works, but exclusive start/end)findAllByMetadataStartTimeGreaterThanEqual(start)
(works, but no end)
However, when I try: findAllByMetadataStartTimeGreaterThanEqualAndMetadataStartTimeLessThanEqual(start,end)
I get the error: json can't serialize type : class java.time.LocalDateTime
Any idea why this particular combination throws this error, when the previous ones do not?