https://kotlinlang.org logo
Title
u

user

06/29/2022, 12:51 PM
How to use kotlin value classes with MyBatis Can anybody give advive for using kotlin inline class () with MyBatis. I have this code: MyBatis mapper: @Mapper interface EntityMapper { fun findEntitiesByStatuses(startId: Long, fetchLimit: FetchLimit, statuses: List) } Value class: @JvmInline value class FetchLimit( val value: Int ) { init { require(value >= 1) { "FetchLimit should be grater or equal 1. Current: $value" } } } Xml with sql: SELECT e.id, e.status,...