我正在使用 JDK 1.6.0_16 和 Scala 2.7.7,使用 maven 进行编译。
我这样做mvn clean compile
了,我得到了四个错误,但它们是相同的,在不同的模型中:
[错误] C:\Users\owner\workspace\ResumeApp\src\main\scala\jblack\resumeapp\lift\ model\ContactInfoModel.scala:13:错误:非法继承;
[INFO] self-type jblack.resumeapp.lift.model.ContactInfoModel 不符合 net.liftweb.mapper.CRUDify[Long,jblack.resumeapp.lift.model.ContactInfoModel] 的 selftype net.liftweb.mapper.CRUDify[ Long,jblack.resumeapp.lift.model.ContactInfoModel] 与 jblack.resumeapp.lift.model.ContactInfoModel 与 net.liftweb.map per.KeyedMetaMapper[Long,jblack.resumeapp.lift.model.ContactInfoModel]
[INFO] 与 CRUDify[Long, ContactInfoModel] {
这是我的代码:
package jblack.resumeapp.lift.model
import net.liftweb.mapper._
object ContactInfoMetaData
extends ContactInfoModel
with KeyedMetaMapper[Long, ContactInfoModel] {
override def dbTableName = "contactinfo"
override def fieldOrder = List(key, data, display)
}
class ContactInfoModel
extends KeyedMapper[Long, ContactInfoModel]
with CRUDify[Long, ContactInfoModel] {
def getSingleton = ContactInfoMetaData
def primaryKeyField = id
object id extends MappedLongIndex(this)
object key extends MappedString(this, 100)
object data extends MappedString(this, 100)
object display extends MappedBoolean(this)
}
我不确定我做错了什么。
不幸的是,因为我在Eclipse中安装了nightly插件,无法安装IDE 2.7.7,所以只能用maven编译。
我的使用方式有问题CRUDify
吗?