-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I am using named tuples in a project, it works nicely, great work 👍
However, I encountered a usability problem: a silly mistake that took me some time to debug.
Given a model that works well:
case class City(id: Int, name: String)
City.insert.columns(_.name := "Lausanne").returning(_.id).single
When I add a new field rating
and update the query with a mistake (used =
instead of :=
):
case class City(id: Int, name: String, rating: Int)
City.insert.columns(_.name := "Lausanne", _.rating = 3).returning(_.id).single
The compiler complains that:
value rating is not a member of scalasql.namedtuples.SimpleTable.Record[City, scalasql.query.Column]
However, the field is there. It would be nice to avoid the misleading message.
Metadata
Metadata
Assignees
Labels
No labels