Play Scala: How to access multiple databases with anorm and Magic[T] Play Scala: How to access multiple databases with anorm and Magic[T] database database

Play Scala: How to access multiple databases with anorm and Magic[T]


In play.api.db.DB it appears you can pass in a string of the name you defined in application.conf.

Then use one of the methods specified here: http://www.playframework.org/documentation/2.0/ScalaDatabase

# play.api.db.DB.classdef withConnection[A](name : scala.Predef.String)(block : scala.Function1[java.sql.Connection, A])(implicit app : play.api.Application) : A = { /* compiled code */ }