Does a Mapper MappedStringForeignKey check for existence when set?

17 views
Skip to first unread message

Peter Robinett

unread,
Nov 24, 2009, 5:47:02 PM11/24/09
to Lift
I having some memory problems that I suspect are caused, at the end of
the day, by creating many Mapper instances and setting their
MappedStringForeignKey property. When I set it, is it being looked up
in the database? Based on a previous thread[1], I suspect it is. This
is with 1.1-M5.

Thanks,
Peter Robinett

[1]: http://groups.google.com/group/liftweb/browse_thread/thread/41894ec33fc538/104ab87f1213ea7b

David Pollak

unread,
Nov 24, 2009, 5:54:33 PM11/24/09
to lif...@googlegroups.com
On Tue, Nov 24, 2009 at 2:47 PM, Peter Robinett <pe...@bubblefoundry.com> wrote:
I having some memory problems that I suspect are caused, at the end of
the day, by creating many Mapper instances and setting their
MappedStringForeignKey property. When I set it, is it being looked up
in the database? Based on a previous thread[1], I suspect it is. This
is with 1.1-M5.

It's not being looked up in the database until you call .obj on the field.
 

--

You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.





--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

Peter Robinett

unread,
Nov 24, 2009, 8:07:02 PM11/24/09
to Lift
Ok, thanks, that makes sense.

On Nov 24, 2:54 pm, David Pollak <feeder.of.the.be...@gmail.com>
wrote:
> On Tue, Nov 24, 2009 at 2:47 PM, Peter Robinett <pe...@bubblefoundry.com>wrote:
>
> > I having some memory problems that I suspect are caused, at the end of
> > the day, by creating many Mapper instances and setting their
> > MappedStringForeignKey property. When I set it, is it being looked up
> > in the database? Based on a previous thread[1], I suspect it is. This
> > is with 1.1-M5.
>
> It's not being looked up in the database until you call .obj on the field.
>
>
>
>
>
> > Thanks,
> > Peter Robinett
>
> > [1]:
> >http://groups.google.com/group/liftweb/browse_thread/thread/41894ec33...
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > liftweb+u...@googlegroups.com<liftweb%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/liftweb?hl=en.
>
> --
> Lift, the simply functional web frameworkhttp://liftweb.net
> Beginning Scalahttp://www.apress.com/book/view/1430219890
Reply all
Reply to author
Forward
0 new messages