Skip to content

Unsupported operations post upgrading to scala 2.12 #701

@rahul-narayana

Description

@rahul-narayana

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions