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

franek

10/05/2018, 8:34 AM
Hi, I have table song and table genre. Song can contains more genres. So I want reference genreIds from table genre. How I can reference to array of foreign keys? For single reference is syntax (integer(“genre_id”) references GenreTable.id) it is working but what about more values?. Or I use it bad?
t

tapac

10/05/2018, 11:13 AM
You need an additional table to link many-to-many (songs-to-genres) https://github.com/JetBrains/Exposed/wiki/DAO#many-to-many-reference
👍 1
a

avolkmann

10/05/2018, 12:40 PM
maybe also post the answer to SO for other people
✔️ 1
2 Views