diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2005-12-24 17:37:11 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2005-12-24 17:37:11 +0000 |
commit | 35c7caba9a822a4ff101c032a78b9a339faa2aba (patch) | |
tree | 91d7ba65f6142790346a8480df52e6291f7d13b6 /lib/sqlalchemy/mapping/properties.py | |
parent | 0407896b0a8024808f565d3faa379ce4313e8920 (diff) | |
download | sqlalchemy-35c7caba9a822a4ff101c032a78b9a339faa2aba.tar.gz |
comments re: partial ordering, association dependencies
license for topological
Diffstat (limited to 'lib/sqlalchemy/mapping/properties.py')
-rw-r--r-- | lib/sqlalchemy/mapping/properties.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/sqlalchemy/mapping/properties.py b/lib/sqlalchemy/mapping/properties.py index 443f5eac8..cd04c0c64 100644 --- a/lib/sqlalchemy/mapping/properties.py +++ b/lib/sqlalchemy/mapping/properties.py @@ -387,20 +387,23 @@ class PropertyLoader(MapperProperty): they've been deleted. The process operation manages attributes and dependent operations upon the objects of one of the involved mappers.""" if self.association is not None: - # association object. our mapper is made to be dependent on our parent, - # as well as the object we associate to. when theyre done saving (or before they - # are deleted), we will process child items off objects managed by our parent mapper. - - # still working out how the dependencies should work here. - - # this seems to work: + # association object. our mapper should be dependent on both + # the parent mapper and the association object mapper. + + # this seems to work, association->parent->self, then + # we process the child elements after the 'parent' save. but + # then the parent is dependent on the association which is + # somewhat arbitrary, might compete with some other dependency: # uowcommit.register_dependency(self.association, self.parent) # uowcommit.register_dependency(self.parent, self.mapper) # #uowcommit.register_dependency(self.association, self.mapper) # uowcommit.register_processor(self.parent, self, self.parent, False) # uowcommit.register_processor(self.parent, self, self.parent, True) - # this seems to work too, using the "stub" as a marker + # this is where we put the "stub" as a marker, so we get + # association/parent->stub->self, then we process the child + # elments after the 'stub' save, which is before our own + # mapper's save. stub = PropertyLoader.MapperStub() uowcommit.register_dependency(self.parent, stub) uowcommit.register_dependency(self.association, stub) |