Can you post a code sample and the error? try: object owner extends MappedLongForeignKey(this, User) { override def defaultValue = User.currentUserId openOr 0L }
On Wed, May 20, 2009 at 5:38 PM, Tobias Daub <hannes.flo...@gmx.li> wrote: > > Hello Lifters, > > I wanted to override the defaultValue of my owner field, to always set > it to the currentUser. I cannot compile this, because I get an error > (what I kind of understand). During compilation, there's no currentUser > so this function call has to be delayed somehow, but how? > > The definition of the owner field is inside a trait, is this a > additional reason for this error? > > > thanks! > > > > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---