@loader_option()
def contains_eager(loadopt, attr, alias=None):
 if (alias is not None):
  if (not isinstance(alias, str)):
   info = inspect(alias)
   alias = info.selectable
 cloned = loadopt.set_relationship_strategy(attr, {'lazy': 'joined'}, propagate_to_loaders=False)
 cloned.local_opts['eager_from_alias'] = alias
 return cloned

@ loader_option ( ) def contains_eager ( loadopt , attr , alias = None ) : if ( alias is not None ) : if ( not isinstance ( alias , str ) ) : info = inspect ( alias ) alias = info . selectable cloned = loadopt . set_relationship_strategy ( attr , { 'lazy' : 'joined' } , propagate_to_loaders = False ) cloned . local_opts [ 'eager_from_alias' ] = alias return cloned
indicate that the given attribute should be eagerly loaded from columns stated manually in the query .