Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported operations post upgrading to scala 2.12 #701

Open
rahul-narayana opened this issue Oct 6, 2022 · 1 comment
Open

Unsupported operations post upgrading to scala 2.12 #701

rahul-narayana opened this issue Oct 6, 2022 · 1 comment

Comments

@rahul-narayana
Copy link

Hello Team,

I am migrating a legacy play project from scala 2.11 to 2.12. We have a dependency on slick for jdbc connections

The version we are using:

  "com.typesafe.play" %% "play-slick" % "3.0.1",
  "com.typesafe.slick" %% "slick-hikaricp" % "3.2.3",
  "com.typesafe.play" %% "play-slick-evolutions" % "3.0.1",

For unit tests we are using H2 in-memory database. We are injecting the database client. Slick configuration for the same:

slick.dbs.default.profile="slick.jdbc.H2Profile$"
slick.dbs.default.db.driver="org.h2.Driver"
slick.dbs.default.db.url="jdbc:h2:mem:play;MODE=MYSQL;DB_CLOSE_DELAY=-1"
slick.dbs.default.db.user=sa
slick.dbs.default.db.password="sa"
slick.dbs.default.db.numThreads = 4
slick.dbs.default.db.queueSize = 200

Post upgrading to scala 2.12, Few test cases have started failing due to unsupported operation exception

slick.SlickException: InsertOrUpdate is not supported on a table without PK.
  at slick.jdbc.JdbcActionComponent$InsertActionComposerImpl$InsertOrUpdateAction.<init>(JdbcActionComponent.scala:550)
  at slick.jdbc.JdbcActionComponent$InsertActionComposerImpl.insertOrUpdate(JdbcActionComponent.scala:468)

Since I am not changing the version wondering what could have caused this compatibility issue

@mkurz
Copy link
Member

mkurz commented Oct 6, 2022

So you say the underlying slick versions hasn't changed? You only changed the Scala version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants