Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ abstract class SlickBlockingAPISpec(p: BlockingJdbcProfile) extends AnyFunSuite

test("insert returning") {
testWithSession { implicit session =>
val id = Users.returning(Users.map(_.id)) insert UsersRow(1, "takezoe", None)
val id = Users.returning(Users.map(_.id)).insert(UsersRow(1, "takezoe", None))
assert(id == 1)
assert(Users.length.run == 1)
val u = (Users.returning(Users.map(_.id)).into((u, id) => u.copy(id = id))) insert UsersRow(2, "takezoe", None)
val u = Users.returning(Users.map(_.id)).into((u, id) => u.copy(id = id)).insert(UsersRow(2, "takezoe", None))
assert(u.id == 2)
assert(Users.length.run == 2)
}
Expand Down