> this is based on the fact that "expunge" has its own "cascade" path.
> if we say, expunge along the "delete-orphan" path, thats something
> different so maybe that would work,

Yeah, you got right to the root of what I think is the Right Way(tm)

The point here is the concept of 'delete-orphan'. If I were to disconnect a
child object from it's parent and thereby orphan the child, and also
declared my  lack of interest in tracking the child with the
'delete-orphan', then I would think the child should be removed if
dissociated from its parent  -- if it's persisted then deleted, else
expunged. Isn't that the whole point of 'delete-orphan', whether persisted
or not?

Your earlier mail talks about other referencing objects. But hang on a sec:
aren't multiple references inconsistent with delete-orphan anyway? Couldn't
we disallow other references for delete-orphan relations? That would take
care of both the external reference problem to <this> delete-orphan node
that's subject to removal, and would also nicely handle any external
references to child objects of <this> delete-orphan node: Any children of
<this> under-delete node would only be removed if they too were
'delete-orphan', which by definition would eliminate (by prohibition) any
other references to them.

That would make 'delete-orphan' relationships useful primarily for
weakly-linked objects. But I'm going to guess that most delete-orphan
relationships would usually be leaf nodes of an object graph anyway. They
have a kind of throw-away nature that lends themselves to things like
property/attribute rows.

> still seems a little creepy to
> me.  I think the expunge has to happen as an on-attribute event
> though, otherwise we'd have to track that action somewhere.

I don't follow you here, isn't the removal a de-facto event on the
psuedo-attribute of the relation?

....creepy? :-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to