mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-05-26 10:32:33 -04:00
- add notes that @comparator and @expression don't go together.
Change-Id: I3fb366f8b49454453e4b6dada565c24c5ccb975e
(cherry picked from commit 8965f30215)
This commit is contained in:
@@ -328,6 +328,10 @@ behavior of each SQLAlchemy expression operator individually. They
|
||||
are useful when creating custom types that have some highly
|
||||
idiosyncratic behavior on the SQL side.
|
||||
|
||||
.. note:: The :meth:`.hybrid_property.comparator` decorator introduced
|
||||
in this section **replaces** the use of the
|
||||
:meth:`.hybrid_property.expression` decorator. They cannot be used together.
|
||||
|
||||
The example class below allows case-insensitive comparisons on the attribute
|
||||
named ``word_insensitive``::
|
||||
|
||||
@@ -784,6 +788,10 @@ class hybrid_property(interfaces.InspectionAttrInfo):
|
||||
The return value of the decorated method should be an instance of
|
||||
:class:`~.hybrid.Comparator`.
|
||||
|
||||
.. note:: The :meth:`.hybrid_property.comparator` decorator
|
||||
**replaces** the use of the :meth:`.hybrid_property.expression`
|
||||
decorator. They cannot be used together.
|
||||
|
||||
"""
|
||||
|
||||
proxy_attr = attributes.\
|
||||
|
||||
Reference in New Issue
Block a user