If you pass a PropComparator class to the comparator_factory argument of "synonym()", an instance of that class will be used when Python comparison operations are invoked upon the mapped attribute at the class level. Whatever behavior it defines from there is what takes place, which should include the __getattr__() proxying that would locate your "near()" method.
If things don't work, provide a short, succinct, working (meaning, shows the problem) test case and we can see what might be the issue.
--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/j5XfGj-vyZAJ.
To post to this group, send email to sqlal...@googlegroups.com.
To unsubscribe from this group, send email to sqlalchemy+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
I will see if later today I can provide some tests, or by tomorrow. I think the basic rationale is that a composite property should behave like a regular mapped property, and those have a comparator_factory, although I know this is probable a lame argument.
--
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.
To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/J9HVsxHYg60J.