invalidation -> transient patch: relationships faulted?

From: Mike Kienenberger (mkienen..laska.net)
Date: Mon Jan 10 2005 - 11:32:34 EST

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-259) Error with national characters"

    One thing I think is still not handled right is the relationships for an
    object marked invalid in another context.

    To be honest, my primary reason for marking objects invalid is to force the
    relationships to faults. This is because I don't delete objects; I simply
    mark them invalid in the database and filter them out using restricting
    qualifiers.
    So the trick is how to make an object that was marked invalidated "go away".

    I see the following code in ObjectStore.processIndirectlyModifiedIDs().

    Can I safely add this into processInvalidatedIDs()? I'm not really sure
    what an processIndirectlyModifiedID is, although I'm guessing it's triggered
    when you change a toMany relationship. The one thing I am not sure about is
    what happens to a MODIFIED or DELETED relationship target if you replace it
    with a Fault? I'm guessing that those changes would be lost.

    I also wonder if I should remove the isSourceIndependentFromTargetChange()
    check, but again that would have consequences for the MODIFIED "invalidated"
    object.

    -Mike

                    Iterator relationshipIterator =
    entity.getRelationships().iterator();
                    while (relationshipIterator.hasNext()) {
                        ObjRelationship relationship = (ObjRelationship)
    relationshipIterator
                                .next();

                        if (relationship.isSourceIndependentFromTargetChange())
    {
                            Object fault = relationship.isToMany()
                                    ? Fault.getToManyFault()
                                    : Fault.getToOneFault();
                            object.writePropertyDirectly(relationship.getName(),
    fault);
                        }
                    }



    This archive was generated by hypermail 2.0.0 : Mon Jan 10 2005 - 11:32:32 EST