我一直在玩弄幻影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]
我正在使用 Scala2.11.6
和 Phantom 1.10.1
,非常感谢所有帮助!