Hi, do you know a good ORM framework for Kotlin ?
# announcements
m
Hi, do you know a good ORM framework for Kotlin ?
k
There's thin one by JetBrains: https://github.com/JetBrains/Exposed
m
Yes but it's a prototype and when I tried it, it seems required to make all request in a single transaction (like the sample)
c
well, you can use all the Java ORMs I think
m
Yes of course, but I'm looking for Kotlin designed ORM (with data class suport, functionnal programming...) I found a few from https://github.com/KotlinBy/awesome-kotlin
I did not find my happiness...
s
This doesn’t answer your question directly, but in my project I’m using JDBI for my SQL calls - JDBI is written for Java, but it does have a great plugin that provides data binding support for Kotlin data classes, as well as some extension functions to allow for more functional logic than JDBI provides for in Java
my point being that you may have some luck looking for Java libraries that are also embracing Kotlin and provide plugins or other support for the language
t
requery works pretty well with kotlin’
m
Thanks, I test requery and I don't like the code generation. I make my entities and I need to compile my project to genenarte POJO... At this moment, I uses ORMLite. It's support data class and it's pretty easy to use with a good documentation/communauty
l
Hibernate works with kotlin) data classes and so on)
n
@mmaillot We used JDBI 2 to great effect, but it had some quirks mainly with Java 8 types like
java.time.*
and
Optional
. We are starting to use JDBI 3 now. It's not yet released but has better Java 8 and Kotlin support and it seems it's mainly missing some documentation at this point. https://jdbi.github.io/#_sqlobject
👌 1
m
@niklas thanks, i'll look this framework.