- attached ticket2248.patch
composites lost compartor_factory, re-test
Issue #2248
resolved
not sure if there was a rationale here, so tests will be needed in test/orm/test_composites.py to establish that this is possible and works as expected:
--- a/lib/sqlalchemy/orm/descriptor_props.py Sat Aug 06 15:52:50 2011 -0400
+++ b/lib/sqlalchemy/orm/descriptor_props.py Sat Aug 06 18:26:12 2011 -0400
@@ -80,6 +80,8 @@
self.active_history = kwargs.get('active_history', False)
self.deferred = kwargs.get('deferred', False)
self.group = kwargs.get('group', None)
+ self.comparator_factory = kwargs.pop('comparator_factory',
+ self.__class__.Comparator)
util.set_creation_order(self)
self._create_descriptor()
@@ -258,7 +260,7 @@
)
def _comparator_factory(self, mapper):
- return CompositeProperty.Comparator(self)
+ return self.comparator_factory(self)
class Comparator(PropComparator):
def __init__(self, prop, adapter=None):
Comments (4)
-
Account Deleted -
Account Deleted I've included the unit tests that I mentioned I was going to do in the newsgroup: https://groups.google.com/forum/#!topic/sqlalchemy/4H7_HZ0D744
-
reporter thanks for the patch ! not sure how this ticket wound up in 0.7.xx, had a working patch. 80c68c0e22e2b45b3eaffcb7485d6a9f5eb02ba4
-
reporter - removed milestone
Removing milestone: 0.7.3 (automated comment)
- Log in to comment
Includes last patch and unit tests for that patch