There is no need for a DB object (part of Play JDBC, not Anorm). Anorm works the way you mean it, as implicit:
implicit val con: java.sql.Connection = ??? // whatever you want to resolve connection SQL"SELECT * FROM Table".as(...)
You can enable the JDBC connection in many ways: basic DriverManager.getConnection , JNDI, ...
Regarding the dependency, it's easy to add it to the SBT: How to declare a dependency on an anonymous announcement for a single application? .
cchantep
source share