Hi Mike,
I don't have a chance at the moment to go into implementation details, but
I agree that invalidation should fault the relationships as well. This
feels like the right thing to do.
Andrus
> 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 : Wed Jan 12 2005 - 12:33:56 EST