Joel
11/10/2020, 5:06 PMval fullName: String get() = listOfNotNull(firstName, lastName).joinToString(" ")
private var cachedFullName by UserDetailsTable.fullName
companion object : EntityClass<String, UserDetailsView>(UserDetailsTable) {
init {
EntityHook.subscribe { action ->
action.toEntity(this)?.let { it.cachedFullName = it.fullName }
}
}
}
Is there a cleaner way to set a computed value using the DAO?tapac
11/11/2020, 7:24 AMJoel
11/11/2020, 3:48 PMUser.new(userId) {
firstName = "John"
lastName = "Doe"
}