franek
10/08/2018, 8:18 PMtapac
10/09/2018, 7:44 AMRadioTable.genreIds inList genreIds
doesn't work?franek
10/09/2018, 8:07 AMtapac
10/09/2018, 8:10 AMRadioTable.innerJoin(RadioToGenresTable).select {
(RadioTable.name like "%$search%")
and (RadioToGenresTable.genreId inList genreIds)
}.withDistinct().
orderBy(RadioTable.name, isAsc = true).
limit(limit, offset)
franek
10/09/2018, 8:16 AMtapac
10/10/2018, 2:40 PMGenre
data class then you can innerJoin Radio with Genres and then make groupBy Radio.id on kotlin side.
If you use Exposed DAO then read here https://github.com/JetBrains/Exposed/wiki/DAO#many-to-many-reference