Re: DataContext.performNonSelectingQuery()

From: Gili (cowwo..bs.darktech.org)
Date: Mon Sep 05 2005 - 15:45:01 EDT

  • Next message: Gili: "Re: DataContext.invalidateObject(DataObject)"

    Andrus Adamchik wrote:
    > I never had to do that in my practice, so maybe there is still some
    > Hibernate mindset present in your design that makes it necessary. E.g.
    > if instead of building a SQLTemplate to delete your objects, you delete
    > them via DataContext (fetch, then analyze in memory, then delete a
    > subset of them), you won't have to go through all that.

            At least in Hibernate, in-memory processing of said items is
    exponentially slower than using a bulk-delete and handling this all on
    the DB side. Then again, maybe this was more of a Hibernate-specific
    problem. You're supposed to be able to delete objects without actually
    retrieving their value (i.e. delete based upon primary key) but it
    doesn't actually work as documented. I assume this works properly in
    Cayenne so performance should be much better.

    > Umm, yeah - context.invalidateObjects(dataContext.getObjectStore
    > ().getObjects())

            Ok, so invalidateObjects() does not actually dump the object state
    then? I was under the impression it removes any modifications that
    occured since the DB instance was originally retrieved.

    Thank you,
    Gili



    This archive was generated by hypermail 2.0.0 : Mon Sep 05 2005 - 15:45:02 EDT