Well I have some problems regarding class names actually, here goes my problem
I have a case class like this,
case class Foo(
val compositeKey: String, // clientId-now-requestId
val requestPath: String,
val requestStatus: String) {
def this() = this("", "", "")
def someData = this.compositeKey.split("-")(0)
def someData2 = this.compositeKey.split("-")(2)
}
And Projection class for Slick,
class Foos(tag: Tag) extends Table[Foo](tag, "Foo") {
def compositeKey: Column[String] = column[String]("composite_key", O.PrimaryKey)
def requestPath: Column[String] = column[String]("request_path")
def requestStatus: Column[String] = column[String]("request_status")
def * : ProvenShape[ClientApiLog] = (compositeKey, requestPath, requestStatus) <> (Foo.tupled, Foo.unapply) //Error is thrown in this line
}
And unfortunately, case class name == object
object Foo {
.
.
.
}
This is an old code and the case class and the object has been used in many places so I can't change the name of the case class or the object, and since they have the same name I have having problems creating a projection class, I am getting errors in this line:
def * : ProvenShape[Foo] = (compositeKey, requestPath, requestStatus) <> (Foo.tupled, Foo.unapply)
- Implicit conversions found: (compositeKey, requestPath, requestStatus) => anyToToShapedValue((compositeKey, requestPath,
requestStatus))
- value tupled is not a member of object models.Foo
- implements scala.slick.lifted.AbstractTable.$times
And when I change the case class name and use it in the projection class it works properly, I have am having this problem because case class and object have the same name. Is there any solution to this problem, can it be solved without changing the case class/object name ??