Re: [sqlalchemy] Hybrid comparator vs expression

2012-07-18 Thread Michael Bayer
On Jul 18, 2012, at 8:50 AM, Fayaz Yusuf Khan wrote: > If I'm writing a comparator decorator, does it take care of expression > decorator too? yes, @comparator is another way to define @expression. > > Eg: > >@hybrid_property >def phone_number(self): >return self._phone_num

[sqlalchemy] Hybrid comparator vs expression

2012-07-18 Thread Fayaz Yusuf Khan
If I'm writing a comparator decorator, does it take care of expression decorator too? Eg: @hybrid_property def phone_number(self): return self._phone_number @phone_number.comparator def phone_number(cls): """Truncate the RHS value if it's too long to fit into the