[Lift] Re: Converting a rails application to lift

2010-03-06 Thread Achint Sandhu
Hi, Small update. Changing the order of the comparison in my code i.e. b.author == 1 instead of 1 == b.author fixed the warning, but I'm still curious as to whether what I'm doing is a good idea. Thanks. Cheers, Achint On Mar 6, 2:14 pm, Achint Sandhu wrote: > Hi, > > I've run into a slight

[Lift] Re: Converting a rails application to lift

2010-03-06 Thread Achint Sandhu
Hi, I've run into a slight snag with my use of the current approach. I suspect what I'm trying to do is silly. The interaction below is from the lift console and I don't actually use open_! in my code. --- scala> val b = Book.find(1).open_! l: com..Book = com..Book={id=1,author=1} scala>

[Lift] Re: Converting a rails application to lift

2010-03-04 Thread Achint Sandhu
Hi, I'll prefix this by saying that I'm new to this and not qualified to comment, but I would expect the timestamp to always be DateTime. That having been said, either syntax is fine. Cheers, Achint On Mar 3, 3:27 pm, Naftoli Gugenheim wrote: > Is a syntax like this okay (inside an Author map

[Lift] Re: Converting a rails application to lift

2010-03-03 Thread Achint Sandhu
Thank you for the explanation David. I've raised a ticket as requested: http://www.assembla.com/spaces/liftweb/tickets/394-request-for-convenience-conversion-on-mappedlongforeignkey-fields Cheers, Achint On Mar 2, 8:21 pm, David Pollak wrote: > On Tue, Mar 2, 2010 at 5:09 PM, Achint Sandhu wrot

[Lift] Re: Converting a rails application to lift

2010-03-03 Thread Achint Sandhu
There is no problem with the .obj syntax, just that I found it a little un-natural given how it works in the other direction (anAuthor.books). I've raised a ticket as per David's request. On Mar 2, 8:19 pm, Naftoli Gugenheim wrote: > Yes, because, as in the database, essentially it's a MappedLong

[Lift] Re: Converting a rails application to lift

2010-03-03 Thread Achint Sandhu
Thank your the code snippet. It's a lot cleaner than what I have. I'll wait for the official implementation so as not to get into an IP / copyright issues. Thanks again for posting. Cheers, Achint On Mar 2, 8:32 pm, Jonathan Hoffman wrote: > I'm sure you've got this covered, but I've also had

Re: [Lift] Re: Converting a rails application to lift

2010-03-02 Thread Jonathan Hoffman
I'm sure you've got this covered, but I've also had this requirement and used something like this: http://gist.github.com/320200 On Mar 2, 2010, at 4:01 PM, Achint Sandhu wrote: > Ticket created - > https://liftweb.assembla.com/spaces/liftweb/tickets/390-request-for-trait-that-supports-createdat

Re: [Lift] Re: Converting a rails application to lift

2010-03-02 Thread David Pollak
On Tue, Mar 2, 2010 at 5:09 PM, Achint Sandhu wrote: > Hi, > > Is there any reason why aBook.author would not simply return a Box > instead of requiring aBook.author.obj to get the Box ? > > For some background, see http://blog.lostlake.org/index.php?/archives/19-Keeping-the-meaning-with-the-bytes

Re: [Lift] Re: Converting a rails application to lift

2010-03-02 Thread Naftoli Gugenheim
Yes, because, as in the database, essentially it's a MappedLong (for example), with support built on top of it (via trait mixins) to lookup and cache the referenced entity. Is there a problem with the .obj syntax? - Achint Sandhu wrote: Hi, Is there any reas

[Lift] Re: Converting a rails application to lift

2010-03-02 Thread Achint Sandhu
Hi, Is there any reason why aBook.author would not simply return a Box instead of requiring aBook.author.obj to get the Box ? I'm sure there is a really good reason for this and I'm just trying to get an understanding of the underlying reasoning. Thanks. Cheers, Achint On Mar 2, 3:26 pm, Mads

[Lift] Re: Converting a rails application to lift

2010-03-02 Thread Achint Sandhu
Ticket created - https://liftweb.assembla.com/spaces/liftweb/tickets/390-request-for-trait-that-supports-createdat-and-updatedat Thank You. Cheers, Achint On Mar 2, 3:36 pm, Naftoli Gugenheim wrote: > You can assign the ticket to me because I have code for such fields that I > can contribute.

[Lift] Re: Converting a rails application to lift

2010-03-02 Thread Achint Sandhu
Just a quick note to thank everyone for the prompt responses. Thank You. Cheers, Achint On Mar 2, 3:36 pm, Naftoli Gugenheim wrote: > You can assign the ticket to me because I have code for such fields that I > can contribute. > > - > > David Pollak wrote: >