This question has been asked and is responsible for spots 1 and 2, but the answers do not seem valid for spot 3.
Trying to use a template in How to use enumerations in Scala Slick? ,
object MyEnumMapper { val string_enum_mapping:Map[String,MyEnum] = Map( "a" -> MyEnumA, "b" -> MyEnumB, "c" -> MyEnumC ) val enum_string_mapping:Map[MyEnum,String] = string_enum_mapping.map(_.swap) implicit val myEnumStringMapper = MappedTypeMapper.base[MyEnum,String]( e => enum_string_mapping(e), s => string_enum_mapping(s) ) }
But MappedTypeMapper not available, since slick 1, and the proposed MappedColumnType for slick 2 is no longer available, despite the fact that it is documented here .
What is the latest best practice for this?
source share