i am following this guide and using the same code but in sbt 1.2.8 the code for store method is giving an error message
case class Mutant(
firstName: String,
lastName: String,
address: String,
pictureLocation: String
)
abstract class Mutants extends Table[Mutants,Mutant] {
override def tableName: String = "mutant_data"
object firstName extends StringColumn with PartitionKey {
override def name = "first_name"
}
object lastName extends StringColumn with PartitionKey {
override def name = "last_name"
}
object adress extends StringColumn
object pictureLocation extends StringColumn {
override def name = "picture_location"
}
}
`class MutantsDatabase(override val connector: CassandraConnection) extends` Database[MutantsDatabase](connector) {
object mutants extends Mutants with Connector
}
class MutantInsert {
val connection: CassandraConnection =
ContactPoints(List("scylla-node1:9042", "scylla-node2:9042", "scylla-node3:9042"))
.keySpace("catalog")
val db = new MutantsDatabase(connection)
import db.{session, space}
val insertionResult:Future[ResultSet] = db.mutants.store(mu).future()
}
when i compile the code i got the error message
value future is not a member of com.outworkers.phantom.builder.query.InsertQuery.Default[db.cql.Mutants,models.Mutant]
when i add this import statement
import com.outworkers.phantom.dsl._
the error goes away but i got a run time exception on the same store method line
java.lang.ClassCastException: Cannot cast scala.concurrent.impl.Promise$Transformation to com.outworkers.phantom.ResultSet