def _get_col_o2m(cls, fk_col_name, deferrable=None, initially=None, ondelete=None, onupdate=None):
 assert (cls.Attributes.table_name is not None), ('%r has no table name.' % cls)
 (col_args, col_kwargs) = sanitize_args(cls.Attributes.sqla_column_args)
 (pk_column,) = get_pk_columns(cls)
 (pk_key, pk_spyne_type) = pk_column
 pk_sqla_type = _get_sqlalchemy_type(pk_spyne_type)
 if (fk_col_name is None):
  fk_col_name = '_'.join([cls.Attributes.table_name, pk_key])
 (yield [(fk_col_name, pk_sqla_type)])
 fk = ForeignKey(('%s.%s' % (cls.Attributes.table_name, pk_key)), deferrable=deferrable, initially=initially, ondelete=ondelete, onupdate=onupdate)
 col = Column(fk_col_name, pk_sqla_type, fk, *col_args, **col_kwargs)
 (yield col)

def _get_col_o2m ( cls , fk_col_name , deferrable = None , initially = None , ondelete = None , onupdate = None ) : assert ( cls . Attributes . table_name is not None ) , ( '%r has no table name.' % cls ) ( col_args , col_kwargs ) = sanitize_args ( cls . Attributes . sqla_column_args ) ( pk_column , ) = get_pk_columns ( cls ) ( pk_key , pk_spyne_type ) = pk_column pk_sqla_type = _get_sqlalchemy_type ( pk_spyne_type ) if ( fk_col_name is None ) : fk_col_name = '_' . join ( [ cls . Attributes . table_name , pk_key ] ) ( yield [ ( fk_col_name , pk_sqla_type ) ] ) fk = ForeignKey ( ( '%s.%s' % ( cls . Attributes . table_name , pk_key ) ) , deferrable = deferrable , initially = initially , ondelete = ondelete , onupdate = onupdate ) col = Column ( fk_col_name , pk_sqla_type , fk , * col_args , ** col_kwargs ) ( yield col )
gets the parent class and returns a column that points to the primary key of the parent .