Skip to content
Advertisement

Tag: spring-repositories

JPA query to filter before, after and between optional start and end dates

I’d like to write a JPA Repository query that can findBy with two optional query parameters, startDate and endDate: startDate endDate Return null null All null endDate Before End startDate null After Start startDate endDate Between Start and End How can this be implemented concisely? For example, using a single JPA @Query method with a SQL statement that can handle

Spring Webflux – reactive repository saveAll(Iterable) vs saveAll(Publisher)

Small question about the webflux reactive repository, especially about the methods saveAll Flux saveAll(Iterable var1); versus Flux saveAll(Publisher var1); Wanted to compare, I wrote the following: In terms of “correctness” both codes are doing what is expected. Everything is persisted successfully. But in terms of performance, reactive paradigm, IO Utilisations to DB, Netty Core usage, what is the “best” solution

Advertisement