Re: Deleting a DataObject with an unresolved dependent relationship

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Dec 19 2003 - 16:47:16 EST

  • Next message: Andrus Adamchik: "Re: Deleting a DataObject with an unresolved dependent relationship"

    Hi Terry,

    I thought this was resolved in 1.0.4:
    http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-37 . Could
    you send the stack trace or add it as an issue "comment" using this
    link? I'll see if there is another place where we overlook this issue.

    Thanks
    Andrus

    On Dec 19, 2003, at 4:35 PM, Terry Wilcox wrote:

    > I'm trying to delete a DataObject with a dependent relationship. If I
    > resolve the relationship first, it works. If I don't resolve it first,
    > I get a ClassCastException (in both 1.03 and 1.04).
    >
    > DataContext's delete method uses DataObject's readPropertyDirectly to
    > get the related object, then casts it to DataObject. If the
    > relationship hasn't been resolved, readPropertyDirectly returns a
    > RelationshipFault, not a DataObject. Hence the ClassCastException.
    >
    > Should readPropertyDirectly be returning a RelationshipFault or should
    > it be resolving the relationship and returning the related object. The
    > latter behaviour seems safer, but is it correct?
    >
    > Thanks,
    >
    > Terry Wilcox
    > Entero Corporation
    > terry.wilco..ntero.com



    This archive was generated by hypermail 2.0.0 : Fri Dec 19 2003 - 16:47:20 EST