@loader_option()
def raiseload(loadopt, attr, sql_only=False):
 return loadopt.set_relationship_strategy(attr, {'lazy': ('raise_on_sql' if sql_only else 'raise')})

@ loader_option ( ) def raiseload ( loadopt , attr , sql_only = False ) : return loadopt . set_relationship_strategy ( attr , { 'lazy' : ( 'raise_on_sql' if sql_only else 'raise' ) } )
indicate that the given relationship attribute should disallow lazy loads .