I want to access two databases in Play Scala with anom and Magic [T] (one of them is H2, and the other is PostgreSQL). I just donβt know how to configure it ...
I noticed that we can establish another database connection in conf / application.conf
db_other.url=jdbc:mysql://localhost/test
db_other.driver=com.mysql.jdbc.Driver
db_other.user=root
db_other.pass=
However, how can I use it with Magic? (I read the source code for Magic, but I donβt understand it ... my new to Scala)
In any case, if it is impossible to access several databases with Magic [T], I want to do this with the help of anorm, then how to configure it?
var sqlQuery = SQL(
"""
select * from Country
"""
)
source
share