d

    danielm

    4 years ago
    I've also tried something like .distinctBy { Production } but here only one row is returned.
    Tristan Caron

    Tristan Caron

    4 years ago
    distincBy is a function provided by
    kotlin.Collection
    , not
    exposed
    . You tried what I answer you before?
    d

    danielm

    4 years ago
    Still trying to wrap my head around it
    Tristan Caron

    Tristan Caron

    4 years ago
    How would you write it using raw SQL?
    d

    danielm

    4 years ago
    Hmm, I was not able to figure out an appropriate SQL statement
    But your hit about collections helped a lot, thanks.
    Just for the records I'm using now:
    ...
    .orderBy(Performance.date)
    .map { it[Production.name] }
    .distinct()
    .forEach {
      println(it)
    }