Re: MS SQL Config With Slick 2.0.1 And Playframework 2.2.2

151 views
Skip to first unread message

Christopher Vogt

unread,
Apr 6, 2014, 10:27:27 PM4/6/14
to scala...@googlegroups.com
Please provide the exact code you are using and the exact error message
you get.

Chris

John

unread,
Apr 9, 2014, 6:11:58 PM4/9/14
to scala...@googlegroups.com
I think this may be in response to a deleted post from me.  To get Slick 2.0.1 working with Playframework 2.2.2 I had to install play-slick plugin and include the following in my datasource config:

db.default.slickdriver=com.typesafe.slick.driver.ms.SQLServerDriver
db.default.driver=net.sourceforge.jtds.jdbc.Driver
#rest of config

Where necessary in the I use play.api.db.slick.DB instead of play.api.db.DB, as well as the convenience class DBAction instead of Action in controller methods.  As far as I can tell, Slick gets a connection from the pool managed by Play and associated libs and uses it normally.

The major stumbling blocks for me:

* Figuring out that I needed to configure both db.default.slickdriver AND db.default.driver
* Figuring out that play-slick is essentially required to conveniently integrate Slick 2.x with Play 2.2.  (This should have been obvious I guess.)

Christopher Vogt

unread,
Apr 10, 2014, 7:51:54 AM4/10/14
to scala...@googlegroups.com
We don't delete posts :). It's there

https://groups.google.com/d/msgid/scalaquery/799cc476-5ade-4428-b574-c3c04662255b%40googlegroups.com?utm_medium=email&utm_source=footer

> * Figuring out that I needed to configure both db.default.slickdriver
> AND db.default.driver

Yeah, we have a ticket to look into improving that situation:
https://github.com/slick/slick/issues/670

> * Figuring out that play-slick is essentially required to conveniently
> integrate Slick 2.x with Play 2.2. (This should have been obvious I guess.)

It will be part of Play eventually. We are taking our time a bit.

Thank you for your feedback. It's very welcome!

Chris
Reply all
Reply to author
Forward
0 new messages