私は scala 2.9.1、Play Framework 2.0.4、Spring 3.2.0、Spring Data 2.1.0、neo4j 1.8 を使用しています。
私はこのモデルオブジェクトを持っています:
package models
import java.lang.{String, Long}
import org.springframework.data.neo4j.annotation.{Indexed, NodeEntity, GraphId}
@NodeEntity
class Article(_title: String) {
@GraphId var id: Long = _ //causes the error !!
@Indexed val title: String = _title
def this() {
this("no title")
}
override def hashCode(): Int = {
41 * title.hashCode
}
override def equals(other: Any): Boolean = {
other match {
case that: Article => (that canEqual this) && ((this.id == that.id) && (this.title == that.title))
case _ => false
}
}
def canEqual(other: Any) = other.isInstanceOf[Article]
}
以前は、Play Framework 2.1-RC2 と同じバージョンの Spring Data で Scala 2.10 を使用していましたが、何も悪いことは起こらず、それ以来コードに触れていません (これは個人的なプロジェクトです)。
私はこのエラーを持っています:
MappingException: Setting property `bitmap$init$0` to null on models.Article@466b9021
2.10.0 への前バージョンの scala が問題を引き起こしているようだと (特にコメントで) 説明しているこの類似の投稿を見つけました。
誰かがこの問題に遭遇しましたか? どうすれば修正できますか?