ExpressionException (And: invalid child - ObjPath) when deleting

From: Paul Furbacher (pfurbache..ac.com)
Date: Fri Sep 02 2005 - 12:10:46 EDT

  • Next message: Mike Kienenberger: "Re: ExpressionException (And: invalid child - ObjPath) when deleting"

    Using Modeler, I modeled Person with a toMany relationship to Orders,
    and the reverse toPerson relationship from Orders.

    The Person -> toMany Orders has a Delete Rule of "Cascade", meaning I
    want to delete all orders when a Person is deleted.

    A single class, CustomerService, handles adding and deleting Person
    objects. In a test case, I can add and get specific Person objects.
    However, if I try to delete a Person, I get an ExpressionException
    whose message is "And: invalid child - ObjPath".

    If I change the Delete Rule to "No Action", no exception is thrown
    and the object is indeed deleted and all my tests pass.

    Thinking that I might be doing something wrong in my code, I
    took the HR-View example and added a "Delete Department" button,
    and implemented the deletion code as in my own code.

    So, I'm really at ends trying to figure out why I'm seeing this
    exception when I set the Delete Rule to "Cascade".

    Any ideas?

    (Is there a way to submit these small changes to that example code
    since it might be constructive -- no Cayenne example that I know of
    shows the deletion of individual objects; the one involving
    artists has a mass deletion of a table, but that's a different
    thing.)

    Paul Furbacher



    This archive was generated by hypermail 2.0.0 : Fri Sep 02 2005 - 12:10:52 EDT