【发布时间】:2015-11-03 10:13:37
【问题描述】:
我一直在玩弄幻影wiki中提供的smiple代码,我试过了;
import com.websudos.phantom.dsl._
case class Student(id: UUID, name: String)
class Students extends CassandraTable[Students, Student] {
object id extends UUIDColumn(this) with PartitionKey[UUID]
object name extends StringColumn(this)
def fromRow(row: Row): Student = {
Student(id(row), name(row))
}
}
object Students extends Students with Connector {
def getByName(name: String): Future[Option[Student]] = {
select.where(_.name eqs name).one()
}
}
但我的 IDE 一直显示 Cannot resolve symbol where 而编译器显示 value where is not a member of com.websudos.phantom.builder.query.RootSelectBlock[Students,Student]
我正在使用 Scala 2.11.6 和 Phantom 1.10.1,非常感谢所有帮助!
【问题讨论】:
标签: scala cassandra phantom-dsl