Column type not defined while upgrading from slick 2.1 to slick 3.2 in scala

86 views Asked by At

The following block of code was working on slick 2.1 but when I upgraded the slick version, the code is not working.

import slick.lifted.Column

trait IntegerId {
  def id: Column[Int]
}

The error received: Cannot resolve symbol Column

Is there any alternative or workaround for this issue?

Any help is appreciable.

1

There are 1 answers

0
SergGr On

You didn't provide enough context to really answer your question. Given the fact that Table.column is defined as

def column[C](n: String, options: ColumnOption[C]*)(implicit tt: TypedType[C]): Rep[C] = {

what you need might be

import slick.lifted.Rep

trait IntegerId {
  def id: Rep[Int]
}