And yeah, IMO stay away from heavy-weight ORMs light Hibernate... go with something like JOOQ or QueryDSL to maintain query type safety, but keep all the expressiveness of SQL. If you're brave, you could try
@orangy 's new type-safe SQL project, Squash:
https://bintray.com/kotlin/squash/squash.