Thank you very much. It works great now :)
On 30 Jul., 04:43, David Pollak feeder.of.the.be...@gmail.com wrote:
On Wed, Jul 29, 2009 at 5:54 PM, fbettag fr...@bett.ag wrote:
Now the last and final question: how would i go about and add this to
the trait:
object test extends
On Tue, Jul 28, 2009 at 5:12 PM, fbettag fr...@bett.ag wrote:
So far it looks like this:
trait Stamped[OwnerType : Stamped[OwnerType] with LongKeyedMapper
[OwnerType] with IdPK] {
this: OwnerType =
private val thisTyped = this.asInstanceOf[MapperType]
override def
Yes thanks, it gives me an idea of the issue which i now see.
Could you provide a very simple example on how you would make the Meta-
Mixin?
That would be very good
best regards
On 29 Jul., 21:55, David Pollak feeder.of.the.be...@gmail.com wrote:
On Tue, Jul 28, 2009 at 5:12 PM, fbettag
trait Foo[A : Mapper[A]] {
self: MetaMapper[A] =
}
On Wed, Jul 29, 2009 at 1:38 PM, fbettag fr...@bett.ag wrote:
Yes thanks, it gives me an idea of the issue which i now see.
Could you provide a very simple example on how you would make the Meta-
Mixin?
That would be very good
best
Hm. i changed it to this:
trait Stamped[OwnerType : Mapper[OwnerType] with IdPK] {
self: MetaMapper[OwnerType] =
private val thisTyped = this.asInstanceOf[MapperType]
override def afterSave: List[Any] = {
createActionLog(create, this.getClass.toString,
It's not pretty, but:
trait MyLogger[A : KeyedMapper[K, A], K] extends KeyedMetaMapper[K,A] {
self: A with MetaMapper[A] with KeyedMapper[K, A] =
override def afterSave = doSomething _ :: super.afterSave
private def doSomething(in: A) {
println(Got +in)
}
}
On Wed, Jul 29, 2009
how would i use that trait?
with MyLogger[MyModel, MyModel] ? What is A and what is K supposed to
be?
On 30 Jul., 00:55, David Pollak feeder.of.the.be...@gmail.com wrote:
It's not pretty, but:
trait MyLogger[A : KeyedMapper[K, A], K] extends KeyedMetaMapper[K,A] {
self: A with
Btw. the docs for KeyedMapper don't work..
http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/KeyedMapper.html
when i click on KeyType or OwnerType it gives me a 404..
On 30 Jul., 00:55, David Pollak feeder.of.the.be...@gmail.com wrote:
It's not pretty, but:
trait MyLogger[A :
On Wed, Jul 29, 2009 at 4:21 PM, fbettag fr...@bett.ag wrote:
Btw. the docs for KeyedMapper don't work..
http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/KeyedMapper.html
when i click on KeyType or OwnerType it gives me a 404..
This is a limitation of vscaladoc... sorry.
On Thursday, July 30, 2009, David Pollak feeder.of.the.be...@gmail.com wrote:
On Wed, Jul 29, 2009 at 4:21 PM, fbettag fr...@bett.ag wrote:
Btw. the docs for KeyedMapper don't work..
http://scala-tools.org/scaladocs/liftweb/1.0/net/liftweb/mapper/KeyedMapper.html
when i click on KeyType
K is the type of the primary key:
object MyModel extends MyModel with KeyedMetaMapper[Long, MyModel] with
MyLogger[MyModel, Long]
On Wed, Jul 29, 2009 at 4:18 PM, fbettag fr...@bett.ag wrote:
how would i use that trait?
with MyLogger[MyModel, MyModel] ? What is A and what is K supposed to
Okay i got this so far, only one tiny thing i can't get to work now:
trait Stamped[A : LongKeyedMapper[A]] extends KeyedMetaMapper[Long,
A] {
self: A with MetaMapper[A] with KeyedMapper[Long, A] =
private val thisTyped = this.asInstanceOf[MapperType]
override def
trait Stamped[A : LongKeyedMapper[A] with IdPK] extends
KeyedMetaMapper[Long, A] {
self: A with MetaMapper[A] with KeyedMapper[Long, A] =
override def afterSave = createSaveLog _ :: super.afterSave
override def afterUpdate = createUpdateLog _ :: super.afterSave
And the final version:
trait Stamped[A : LongKeyedMapper[A] with IdPK] extends
KeyedMetaMapper[Long, A] {
self: A with MetaMapper[A] with KeyedMapper[Long, A] =
override def afterSave = (createLog(_: A, create)) ::
super.afterSave
override def afterUpdate = (createLog(_:
Now the last and final question: how would i go about and add this to
the trait:
object test extends MappedBoolean(this) ?
i tried:
private val thisTyped = this.asInstanceOf[A]
object published extends MappedBoolean(thisTyped)
and just this and self. Any ideas?
On 30 Jul.,
On Wed, Jul 29, 2009 at 5:54 PM, fbettag fr...@bett.ag wrote:
Now the last and final question: how would i go about and add this to
the trait:
object test extends MappedBoolean(this) ?
You can't add this to a MetaMapper trait, it must be part of a trait that's
mixed into the Mapper.
Look
So far it looks like this:
trait Stamped[OwnerType : Stamped[OwnerType] with LongKeyedMapper
[OwnerType] with IdPK] {
this: OwnerType =
private val thisTyped = this.asInstanceOf[MapperType]
override def afterSave {
createActionLog(create,
17 matches
Mail list logo