我正在使用JDK 1.6.0_16和Scala 2.7.7編譯maven。非法繼承編譯錯誤使用Scala 2.7.7和LIFT 1.1-SNAPSHOT
我做mvn clean compile
,我得到四個錯誤,但它們是相同的,不同的型號:
[ERROR] C:\Users\owner\workspace\ResumeApp\src\main\scala\jblack\resumeapp\lift\ model\ContactInfoModel.scala:13: error: illegal inheritance;
[INFO] self-type jblack.resumeapp.lift.model.ContactInfoModel does not conform to net.liftweb.mapper.CRUDify[Long,jblack.resumeapp.lift.model.ContactInfoModel] 's selftype net.liftweb.mapper.CRUDify[Long,jblack.resumeapp.lift.model.ContactI nfoModel] with jblack.resumeapp.lift.model.ContactInfoModel with net.liftweb.map per.KeyedMetaMapper[Long,jblack.resumeapp.lift.model.ContactInfoModel]
[INFO] with 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中安裝了夜間插件,所以我不能安裝IDE 2.7.7,所以我只能用maven編譯它。
我的使用方法CRUDify
有問題嗎?
謝謝。自從我開始轉向使用JPA以來,我會看到我有什麼問題。 :)並使用LIFT 1.1。 – 2009-12-12 04:39:34