I'm having a really hard time trying to execute a join on two tables.
Here is my model in Scala :
case class Event(idEvent: Int, blablabla)
case class User(idUser: Int, blablabla)
case class UserParticipatesToEvent(idUser: Int, idEvent: Int)
Basically, a user can attend many different events.
I need to fetch all the users attending an event. Earlier, in slick 2.0, a simple for-comprehension in my User DAO was doing the job:
def findUsersByEvent(idEvent: Int): List[User] = {
(for {
userIds <- EventDAO.findIDUsersByEvent(idEvent)
res <- this.findUserById(userIds)
} yield(res))
}
In slick 3.0, I'm not at all able to figure out how to achieve this simple join. Nowadays, in Slick 3.0, it should return a Future[List[User]].
Thanks in advance for your help.