dave08
04/09/2024, 11:01 AM@KomapperColumn
) there instead of on the data class they inherit?Toshihiro Nakamura
04/09/2024, 12:09 PMdave08
04/09/2024, 12:12 PMToshihiro Nakamura
04/09/2024, 12:16 PMdave08
04/09/2024, 12:19 PMToshihiro Nakamura
04/09/2024, 12:45 PMdata class Common(
@KomapperCreatedAt
val createdAt: LocalDateTime? = null,
@KomapperUpdatedAt
val updatedAt: LocalDateTime? = null,
)
interface CommonAware {
val common: Common
}
val CommonAware.createdAt
get() = common.createdAt
val CommonAware.updatedAt
get() = common.updatedAt
@KomapperEntity
data class Dept(
@KomapperId
val id: Int,
@KomapperEmbedded
override val common : Common = Common()
) : CommonAware
Toshihiro Nakamura
04/09/2024, 12:45 PMval dept = Dept(1)
val timestamp = dept.updatedAt
dave08
04/09/2024, 12:49 PM