Thread
#exposed
    b

    bitkid

    3 years ago
    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
    tapac

    tapac

    3 years ago
    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

    bitkid

    3 years ago
    thx! exactly my question 🙂