Re: Avoiding cache/invalidating

From: Reinier Mostert (rendie..labo.co.za)
Date: Wed Mar 17 2004 - 16:17:34 EST

  • Next message: Mike Elliott: "Dueling Loggers?"

    Thanx Tore,

    That worked. I tried prefetching before, but got the relationship
    accessor wrong (got a path not found error). I assumed it was because
    the relationship is one to many, and I'm on the one side, but it was
    just capitalization.

    Thanks again
    reomoer

    On Wed, 2004-03-17 at 09:08, Tore Halset wrote:
    > On Mar 17, 2004, at 1:37, Reinier Mostert wrote:
    >
    > > I have two related tables in a database with 90% of the data going into
    > > the database using straight SQL queries. Call the tables "unit" and
    > > "part". Each unit can have many parts.
    > >
    > > Now I do a SelectQuery on unit, and then step through the "parts" for
    > > every "unit" in the result. If a new part is added, or an old part is
    > > removed using SQL I don't see this change when I perform the query
    > > again. This is because the parts are in the cache.
    >
    > Perhaps you can use prefetch from unit to part in your query?
    > http://www.objectstyle.org/cayenne/userguide/perform/prefetching.html
    >
    > - Tore.
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Mar 17 2004 - 16:13:29 EST