dave08
04/15/2024, 12:56 PMabstract class KomapperBaseRepository<ENTITY : Any, ID : Any, META : EntityMetamodel<ENTITY, ID, META>>(
private val db: R2dbcDatabase,
private val entityMetamodel: META,
) {
suspend fun create(entity: ENTITY): ENTITY = db.runQuery(QueryDsl.insert(entityMetamodel).single(entity))
}
how do I avoid having to provide all three type params when deriving from this? Doesn't the compiler infer them when I provide the entityMetamodel in the constructor?Javier
04/15/2024, 12:59 PMID?Javier
04/15/2024, 12:59 PMID, try <_, whatever, _>dave08
04/15/2024, 12:59 PMJavier
04/15/2024, 1:00 PM_dave08
04/15/2024, 1:00 PMdave08
04/15/2024, 1:01 PM_...Sam
04/15/2024, 1:06 PMdave08
04/15/2024, 1:08 PMdave08
04/15/2024, 1:09 PMdave08
04/15/2024, 1:10 PMdata object Foo and the IDE didn't complain... any other ideas @Sam?dave08
04/15/2024, 1:20 PM_ can only be used in calling functions: https://kotlinlang.org/docs/generics.html#underscore-operator-for-type-arguments, but not for deriving classes from...Javier
04/15/2024, 1:51 PMdave08
04/15/2024, 1:53 PMJavier
04/15/2024, 1:54 PMKomapperBaseRepository(…) is not working with _, right? due it is a classJavier
04/15/2024, 1:54 PMdave08
04/15/2024, 1:54 PMJavier
04/15/2024, 1:55 PM