diff --git a/CHANGES.rst b/CHANGES.rst index 1da042c..44bacac 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,9 +4,10 @@ Changelog Here you can see the full list of changes between each SQLAlchemy-Utils release. -0.30.1 (2015-05-xx) +0.30.1 (2015-05-05) ^^^^^^^^^^^^^^^^^^^ +- Fixed GenericRelationshipProperty comparator to work with SA 1.0.x (#139) - Make translation_hybrid expression work the same way as SQLAlchemy-i18n translation expressions diff --git a/sqlalchemy_utils/generic.py b/sqlalchemy_utils/generic.py index d117e0c..e466316 100644 --- a/sqlalchemy_utils/generic.py +++ b/sqlalchemy_utils/generic.py @@ -94,6 +94,7 @@ class GenericRelationshipProperty(MapperProperty): """ def __init__(self, discriminator, id, doc=None): + super(GenericRelationshipProperty, self).__init__() self._discriminator_col = discriminator self._id_cols = id self._id = None @@ -138,10 +139,9 @@ class GenericRelationshipProperty(MapperProperty): self.id = list(map(self._column_to_property, self._id_cols)) class Comparator(PropComparator): - def __init__(self, prop, parentmapper): self.property = prop - self._parentmapper = parentmapper + self._parententity = parentmapper def __eq__(self, other): discriminator = six.text_type(type(other).__name__)