Hi,
do you know why afterCreate methods are not invoked after creating the object? Look at this code:
val c = Company.create
println(">>> After create")
c.save
Which produces:
c: com.subeli.officebook.model.Company = 0
>>> After create
create packages
create packages
save packages
The Company model looks like this:
object Company extends Company with LongKeyedMetaMapper[Company] with CRUDify[Long, Company] {
override def dbTableName = "company"
override def beforeCreate = createPackages _ :: super.beforeCreate
override def afterCreate = createPackages _ :: super.afterCreate
override def afterSave = savePackages _ :: super.afterSave
override def afterUpdate = savePackages _ :: super.afterUpdate
private def createPackages(c: Company): Unit = println("create packages")
private def savePackages(c: Company): Unit = println("save packages")
}
Thanks in advance, Etam.