I have the following code in Slick that updates an object user:
val users = TableQuery[UserDB]
val action = users.filter(_.id === user.id).update(user)
val future = db.run(action)
val result = Await.result(future, Duration.Inf)
But there's a field in the user object (password) that I don't want to update. How to omit it?
You should select columns using a
map
operation before anupdate
operation: