[Lift] Re: Object Relationships and the .obj method

2009-07-28 Thread Grant Wood
Derek, Just want to thank you for your attention to this thread, and your quick update of the master.pdf, I know this will clear things up for others as well! I will absolutely provide any other feedback I can. Thank You for all your work on Exploring Lift! - Grant Wood

[Lift] Re: Object Relationships and the .obj method

2009-07-28 Thread Derek Chen-Becker
My pleasure. I'll be the first to admit that the book still needs a lot of work, so anyone with feedback is more than welcome to submit it. I've slowly been working through the backlog of feedback that we've already received, so the quality, breadth and depth of the book should continue to

[Lift] Re: Object Relationships and the .obj method

2009-07-27 Thread Grant Wood
Thank you Ross and Naftoli, The fact that both of you offered solutions for dealing with a Box directly through the .obj method proves that the example in master.pdf is not accurate. I tried several of your suggestions to see what the trade offs were. Since using Foreign Keys is so common, and

[Lift] Re: Object Relationships and the .obj method

2009-07-27 Thread Derek Chen-Becker
Hi Grant, Sorry about the frustration with that example. I'll fix the documentation so that the example is accurate. Please feel free to send any other feedback on Exploring Lift either to this list or to the Book's mailing list. Thanks, Derek On Mon, Jul 27, 2009 at 1:49 PM, Grant Wood

[Lift] Re: Object Relationships and the .obj method

2009-07-27 Thread Derek Chen-Becker
OK, updated PDF is on the site. Derek On Mon, Jul 27, 2009 at 2:56 PM, Derek Chen-Becker dchenbec...@gmail.comwrote: Hi Grant, Sorry about the frustration with that example. I'll fix the documentation so that the example is accurate. Please feel free to send any other feedback on

[Lift] Re: Object Relationships and the .obj method

2009-07-26 Thread Ross Mellgren
I'm not too familiar with mapper, but the probable reason it's giving back a box is in case the target object cannot be resolved (e.g. the FK is NULL, or something). Box can either contain a single object or is empty. In this case you need to pick what to do with an empty box, and there

[Lift] Re: Object Relationships and the .obj method

2009-07-26 Thread Naftoli Gugenheim
Or provide a default: after map(...is).openOr(). You can even do openOr(Predef.error(...)) etc. Note that Predef is necessary if you imported S.error or S._. - Ross Mellgrendri...@gmail.com wrote: I'm not too familiar with mapper, but the probable reason