selectors.py
branchstable
changeset 6871 b746dae3a004
parent 6870 658039c5eeac
child 6881 a473bf557456
equal deleted inserted replaced
6870:658039c5eeac 6871:b746dae3a004
  1143 
  1143 
  1144     `expression` is expected to be a string containing an rql expression, which
  1144     `expression` is expected to be a string containing an rql expression, which
  1145     must use 'X' variable to represent the context entity and may use 'U' to
  1145     must use 'X' variable to represent the context entity and may use 'U' to
  1146     represent the request's user.
  1146     represent the request's user.
  1147 
  1147 
       
  1148     .. warning::
       
  1149         If simply testing value of some attribute/relation of context entity (X),
       
  1150         you should rather use the :class:`score_entity` selector which will
       
  1151         benefit from the ORM's request entities cache.
       
  1152 
  1148     See :class:`~cubicweb.selectors.EntitySelector` documentation for entity
  1153     See :class:`~cubicweb.selectors.EntitySelector` documentation for entity
  1149     lookup / score rules according to the input context.
  1154     lookup / score rules according to the input context.
  1150     """
  1155     """
  1151     def __init__(self, expression, once_is_enough=False):
  1156     def __init__(self, expression, once_is_enough=False):
  1152         super(rql_condition, self).__init__(once_is_enough)
  1157         super(rql_condition, self).__init__(once_is_enough)