Lazy Fetches

From: Merritt, Scott (Scott.Merrit..amu.net)
Date: Thu Jul 03 2003 - 12:14:03 EDT

  • Next message: Andrus Adamchik: "Re: Lazy Fetches"

    It appears that in Cayenne everything is a lazy fetch, as in, data
    accessed through relations isn't fetched until the user tries to use it.
    Is there any way to force the fetching of data via these relationships,
    non-lazy style?

    Also, if I fetch an object from the DB that potentially a huge amount of
    related objects, does it keep populating them until I run out of memory
    or is there some sort of safeguard to prevent this? Say I have a SITE
    table with a one-to-many relation to USERS and users have tables
    branching off of them. I fetch a site object and then perform an
    operation on each user it's related to. Would I have to be concerned of
    hitting too many users and running out of memory because it's fetched
    all this information for each user I hit on? (Say millions?)

    Thanks,
    -smerritt



    This archive was generated by hypermail 2.0.0 : Thu Jul 03 2003 - 12:14:40 EDT