object Status extends Enumeration {
val ACTIVE = Value("active")
val INACTIVE = Value("inactive")
}
object Status extends Enumeration {
case class Status(name: String) extends Val(name)
val ACTIVE: Value = Status("active")
val INACTIVE: Value = Status("inactive")
}
Value
or Val
class Bar(var name: String) extends EntityWithGeneratedID[Long]
class Foo(var a: String, var b: Bar) extends EntityWithGeneratedID[Long]
val barId = 2l
transactional {
new Foo("something", lazyById[Bar](barId))
}