I am a newbie so hoping for some patience. :)
I am trying to populate two tables if a value does not exist. Basically I have:
TABLE b
(
id VARCHA
In Slick 1.0.1
db.withTransaction{ implicit session : Session =>
if( ! Query(b).filter(_.id==="something").exists.run ){
b.insert( "something" )
d.insert( (1,"something") )
}
}
In Slick 2.0
val b = TableQuery[b]
db.withTransaction{ implicit session =>
if( ! b.filter(_.id==="something").exists.run ){
b += "something"
d += (1,"something")
}
}