def __adapt_prop(self, existing, key): comparator = existing.comparator.adapted(self.__adapt_element) queryattr = attributes.QueryableAttribute(self, key, impl=existing.impl, parententity=self, comparator=comparator) setattr(self, key, queryattr) return queryattr
def __adapt_prop(self, prop): existing = getattr(self.__target, prop.key) comparator = existing.comparator.adapted(self.__adapt_element) queryattr = attributes.QueryableAttribute(prop.key, impl=existing.impl, parententity=self, comparator=comparator) setattr(self, prop.key, queryattr) return queryattr