Hi Franz,
Here's what I did, roughly:
trait TimeStamped[OwnerType <: ExtMapper[OwnerType]] {
this: ExtMapper[OwnerType] =>
private val thisTyped = this.asInstanceOf[MapperType]
object createdOn extends ExtMappedDateTime(thisTyped) with
LifecycleCallbacks {
override def beforeCreate = this(new Date)
}
object updatedOn extends ExtMappedDateTime(thisTyped) with
LifecycleCallbacks {
override def beforeUpdate = this(new Date)
}
}
trait ExtMapper[OwnerType <: ExtMapper[OwnerType]] extends
Mapper[OwnerType]
with TimeStamped[OwnerType] with UserStamped[OwnerType]
{
self: OwnerType =>
// A lot more stuff here ...
}
Best,
Clemens
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---