strange result of deletequery

From: moraru_et..pymac.com
Date: Wed Jan 26 2005 - 05:52:37 EST

  • Next message: Giulio Cesare Solaroli: "Errors trying to insert values on Oracle LONG data type with Cayenne"

    ('binary' encoding is not supported, stored as-is) i have a n:m relation between Address & Person tables mapped with AddPers table.

    I wanted to delete the relation between a person and one address using a deletequery.
     So i did somethis like
     Expression add = ExpressionFactory.matchExp("toAddress", a_address);
     Expression pers = ExpressionFactory.matchExp("toPerson", a_person);
    DeleteQuery delq = new DeleteQuery(AddPers.class, add.adnExp(pers));
    dataContext.performNonSelectingQueyr(delq);
    dataContect.commitChanges();

    The object Addpers was delete properly but at the nezt fetch of Person it still
    gave me the Address i just deleted ! So i used dataContext.refetchObject(person)
    but with no effect.

    the delete action between Addpers and address is nullfy and for person the same.

    Finally, the expected behaviour was after selecting the AddPers object with a
    selectQuery and the same expresions and deleting with dataContext.deleteObject(..);

    It is a bug or i missed something in my code?



    This archive was generated by hypermail 2.0.0 : Wed Jan 26 2005 - 05:52:44 EST