28Smiles / jdbi-modules

Modular SQL and mapping for Jdbi
Apache License 2.0
2 stars 1 forks source link

Collector#setComparator is using BiFunction instead of java.util.Comparator #29

Open dhardtke opened 5 years ago

dhardtke commented 5 years ago

I stumbled upon this when I tried using my own Comparator to compare two Beans in the Collector.

I tried this

collector.setComparator(Comparator.comparing(ExamParticipation::getUserId).thenComparing(ExamParticipation::getExamId));

but quickly realized that https://github.com/28Smiles/jdbi-modules/blob/82f0a6e6a6b2acf39e6bcd2dd038e2b6a26e020d/src/main/java/jdbi_modules/internal/CollectorImpl.java#L40 is only accepting BiFunctions.

28Smiles commented 5 years ago

Will be addressed in the next release.

Thank you for reporting this issue