I want to add a method to my DAOs to allow me to insert a list of elements rather than a single element, for the single element I have:
def add(userGroup: UserGroup): Future[Int] = {
dbConfig.db.run(userGroups += userGroup)
}
The documentation seems to suggest I should be able to use ++= like so
def add(userGroups: Seq[UserGroup]): Future[Int] = {
dbConfig.db.run(userGroups ++= userGroups)
}
http://slick.typesafe.com/doc/3.0.0/queries.html#inserting
But this doesn't work, the ++= isn't what it expects apparently?