14
votes

I am writing a web application in play framework. I decided to use slick (FRM) to query in my database (postgre). I am new to slick so I started following slick official document for revision 3.0.0 http://slick.typesafe.com/doc/3.0.0/gettingstarted.html

As per the documentation, I added dependencies in my build.sbt file

libraryDependencies ++= Seq(
  "com.typesafe.slick" %% "slick" % "3.0.0",
  "org.slf4j" % "slf4j-nop" % "1.6.4"
)

Everything else is working fine but while writing below line in my Scala IDE. It is showing error that

value seq is not a member of object slick.dbio.DBIO

val setup = DBIO.seq(
// Above line is showing error

(suppliers.schema ++ coffees.schema).create,
.
.
.
)

In fact Scala IDE (same as eclipse IDE) isn't detecting any member of object DBIO though when I browse slick api of same version http://slick.typesafe.com/doc/3.0.0/api/#slick.dbio.DBIO$ for object DBIO I am seeing seq as it's member.

Where am I doing wrong?

3
I tracked the problem to a known bug in the presentation compiler and REPL, and submitted a workaround for the next release of Slick: stackoverflow.com/questions/30436661/…retronym
@retronym can you fix your link? You're just linking back here with your work-around.Chris Scott
Looks like it's this pull-request: github.com/slick/slick/pull/1224 This will probably hit slick in 3.1.Chris Scott

3 Answers

1
votes

As anticipated by retronym and Chris Scot, this problem was fixed with the release of Slick 3.1

0
votes

You need to import the API for the database you are using:

import slick.driver.PostgresDriver.api._
0
votes

I'm not sure if you've got your answer (I'm answering for those that may stumble upon this in the future), but I've resolved this by upgrading to 3.0.0-M1 and using Action.seq() instead of DBIO.seq()

This may also work in 3.0.0, but I'm not sure as I upgraded from Slick 2.x to 3.0.0-M1!