Re: Synchronization after SQLTemplate

From: Gili (cowwo..bs.darktech.org)
Date: Mon Sep 05 2005 - 16:54:38 EDT

  • Next message: Gili: "Modeler and "unique" attributes?"

            I believe Andrus mentioned I should only be using the standard three
    types of queries (there are no guarantees if I use anything else) and
    DeleteQuery wasn't one of them.

            The method you mention in this and the previous email seem to require
    the operation to occur on the application-end. For performance reasons,
    I really would prefer running all of this directly on the server.

    Gili

    Cris Daniluk wrote:
    > I would store a separate collection of the objects you deleted, then
    > invalidate them from the cache. Even still though, I'm not sure that
    > this would catch all relationships and whatnot (it will probably just
    > reset relationships back to hollow).
    >
    > Couldn't you just use DeleteQuery?
    >
    > Cris
    >
    > On 9/4/05, Gili <cowwo..bs.darktech.org> wrote:
    >
    >>Hi,
    >>
    >> http://www.objectstyle.org/cayenne/userguide/fetch/sqltemplate.html
    >>mentions that ObjectStore might be inconsistent after a SQLTemplate, but
    >>what are we supposed to do then? In Hibernate one would invoke
    >>session.flush() which forces the synchronization of all cached objects
    >>with the DB. Does Cayenne have an equivilent method?
    >>
    >> I want to be able to bulk-delete objects using SQLTemplate (as opposed
    >>to using a SelectQuery) for performance reasons and then update the
    >>cache so I can continue within the same data context.
    >>
    >>Gili
    >>--
    >>http://www.desktopbeautifier.com/
    >>
    >
    >

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Mon Sep 05 2005 - 16:54:38 EDT