Maxime and Dave, thanks a lot.
When I follow the exact example in Squery Page (OCC -
http://squeryl.org/occ.html)
it's works fine.
When I try to put the Lock Optimistic in my Entity, using the Lift-
Record example, the following error occurs:
My Entity Class Book:
class Book private() extends Record[Book] with KeyedRecord[Long]
with Optimistic {
override def meta = Book
@Column(name="id")
override val idField = new LongField(this)
val publisherId = new LongField(this, 0)
val authorId = new LongField(this, 0)
val title = new StringField(this, "")
val publishedInYear = new IntField(this, 1990)
}
The following error (failed to find field occVersionNumber in Record
metadata):
Caused by: java.lang.RuntimeException: failed to find field
occVersionNumber in
Record metadata for class com.company.model.Book
at scala.Predef$.error(Predef.scala:58) ~[scala-
library-2.8.1.jar:na]
at net.liftweb.squerylrecord.RecordMetaDataFactory.fieldFrom
$1(RecordMet
aDataFactory.scala:42) ~[lift-squeryl-record_2.8.1-2.3-M1.jar:2.3-M1]
at
net.liftweb.squerylrecord.RecordMetaDataFactory.findMetaField(RecordM
etaDataFactory.scala:46) ~[lift-squeryl-record_2.8.1-2.3-M1.jar:2.3-
M1]
at
net.liftweb.squerylrecord.RecordMetaDataFactory.build(RecordMetaDataF
actory.scala:70) ~[lift-squeryl-record_2.8.1-2.3-M1.jar:2.3-M1]
at org.squeryl.internals.PosoMetaData$$anonfun
$3.apply(PosoMetaData.scal
a:111) ~[squeryl_2.8.1-0.9.4-RC3.jar:na]
at org.squeryl.internals.PosoMetaData$$anonfun
$3.apply(PosoMetaData.scal
a:80) ~[squeryl_2.8.1-0.9.4-RC3.jar:na]
at scala.collection.immutable.HashMap
$HashMap1.foreach(HashMap.scala:125
) ~[scala-library-2.8.1.jar:na]
Does anyone have any idea?
Thanks again
Roberto Silveira Beneti
> > > >
http://groups.google.com/group/liftweb?hl=en.-Ocultar texto das