My use case is very simple.
I have wrapper class around string in scala and I want to map it to String
type in database using my custom scala mapper code (class is 3rd party and I can't modify it.
All examples I found so far referring to MappedColumnType
which does not seems to exist in Slick 3.
Any help and ideally working examples are appreciated.
Looks like you might be missing the driver api import!
For some reference, have a look at my example here:
implicit def powerPlantTypeMapping =
MappedColumnType.base[PowerPlantType, String](
powerPlantType => PowerPlantType.toString(powerPlantType),
powerPlantTypeStr => PowerPlantType.fromString(powerPlantTypeStr)
)
You need to import:
import driver.api._