Maybe I'm missing something, but you're telling Mapper to pre-cache
User.roomChoice, but then you're accessing User.fromPlace. Are those two
fields related somehow?

Derek

On Mon, Aug 24, 2009 at 12:25 AM, koji <koji....@gmail.com> wrote:

>
> Hi all,
> I want to avoid n+1 problem
> so i try to write my code as
> val users = User.findAll(PreCache(User.roomChoice), By(User.travel,
> travelId))
> and i saw the sql generated only once for querying roomChoice.
> but when i using the
> u.fromPlace.obj, it always become Empty(u.fromPace has correct value)
>
> thanks
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to