hey guys! i am trying exposed for the first time a...
# exposed
b
hey guys! i am trying exposed for the first time and i have question. are you following a certain pattern when converting DAOs to immutable entity objects? i have a PlayerDAO and atm i do
PlayerDAO.find { Players.email eq "someEmail" }.map { it.toPlayer() }
. is that a sane approach just adding a method to the DAO which does the conversion?
Player is a data class btw
t
You have to write your own
.toPlayer()
function, there is no such functionality yet. See https://github.com/JetBrains/Exposed/issues/24 , https://github.com/JetBrains/Exposed/issues/497
b
thx! exactly my question 🙂