Thanks... Another question is, when I want to set the foreign key to null I use talk.actioner_id(null.asInstanceof[UserEntry])
which results an exception, how to set a foreign key to null? Thanks On 5月7日, 上午1時18分, David Pollak <[email protected]> wrote: > On Tue, May 5, 2009 at 6:03 PM, [email protected] < > > [email protected]> wrote: > > > Hello: > > > I want to know how to check if a field is null. > > The code results in an error > > > if (talk.actioner_id.is != null) > > {} > > I'm figuring talk.actioner_id is a MappedLongForeignKey... correct? If so, > use if (talk.acutioner_id.defined_?) { ... } > > Thanks, > > David > > > > > warning: comparing values of types Long and Null using `!=' will > > always yield true > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://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 [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 -~----------~----~----~----~------~----~------~--~---
