def _get_col_o2o(parent, subname, subcls, fk_col_name, deferrable=None, initially=None, ondelete=None, onupdate=None):
 assert (subcls.Attributes.table_name is not None), ('%r has no table name.' % subcls)
 (col_args, col_kwargs) = sanitize_args(subcls.Attributes.sqla_column_args)
 _sp_attrs_to_sqla_constraints(parent, subcls, col_kwargs)
 (pk_column,) = get_pk_columns(subcls)
 (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 = ((subname + '_') + pk_key)
 assert (fk_col_name != subname), 'The column name for the foreign key must be different from the column name for the object itself.'
 fk = ForeignKey(('%s.%s' % (subcls.Attributes.table_name, pk_key)), use_alter=True, name=('%s_%s_fkey' % (subcls.Attributes.table_name, fk_col_name)), deferrable=deferrable, initially=initially, ondelete=ondelete, onupdate=onupdate)
 return Column(fk_col_name, pk_sqla_type, fk, *col_args, **col_kwargs)

def _get_col_o2o ( parent , subname , subcls , fk_col_name , deferrable = None , initially = None , ondelete = None , onupdate = None ) : assert ( subcls . Attributes . table_name is not None ) , ( '%r has no table name.' % subcls ) ( col_args , col_kwargs ) = sanitize_args ( subcls . Attributes . sqla_column_args ) _sp_attrs_to_sqla_constraints ( parent , subcls , col_kwargs ) ( pk_column , ) = get_pk_columns ( subcls ) ( 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 = ( ( subname + '_' ) + pk_key ) assert ( fk_col_name != subname ) , 'The column name for the foreign key must be different from the column name for the object itself.' fk = ForeignKey ( ( '%s.%s' % ( subcls . Attributes . table_name , pk_key ) ) , use_alter = True , name = ( '%s_%s_fkey' % ( subcls . Attributes . table_name , fk_col_name ) ) , deferrable = deferrable , initially = initially , ondelete = ondelete , onupdate = onupdate ) return Column ( fk_col_name , pk_sqla_type , fk , * col_args , ** col_kwargs )
gets key and child type and returns a column that points to the primary key of the child .