In the upgrade guide of Slick 3.0, I found contents like this:
In Slick 1.0 it was common practice to place extra static methods associated with a table into that table’s object. You can do the same in 2.0 with a custom TableQuery object:
object suppliers extends TableQuery(new Suppliers(_)) {
// put extra methods here, e.g.:
val findByID = this.findBy(_.id)
}
Does this mean putting static methods into the table's object is not a common practice or not recommended in Slick 2.x/3.x? (By the way, the syntax of object suppliers extends TableQuery(new Suppliers(_))
looks a bit weird.)
If it is not, what is the preferred way to put the static methods?