``` val fullName: String get() = listOfNotNull(...
# exposed
j
Copy code
val 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?
t
Is the firstName/lastName also parsed from cachedFullName?
j
@tapac negative. They are set directlty.
Copy code
User.new(userId) {
  firstName = "John"
  lastName = "Doe"
}