예제 #1
0
    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
예제 #2
0
파일: util.py 프로젝트: hoprocker/mylons
    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