https://kotlinlang.org logo
#exposed
Title
# exposed
m

Martin Harvan

02/25/2023, 11:21 PM
HI, is it possible in the DAO api to transform multiple DB fields into a single DAO field? e.g. in DB I store
portion
(EARLY, MID, LATE) and
month
and I have data class for it and I would like the DAO to have such field instead of 2 fields
a

Andrew O'Hara

02/26/2023, 6:35 PM
You can always add additional properties to the Entity class. For example:
Copy code
class MyEntity {
  private val part1 by MyTable.part1
  private val part2 MyTable.part2

  val allPArts get() = "$part1$part2
}
👍 1
16 Views