<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('INTERCEROS', 'doctrine');

/**
 * BaseINTERCEROS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_mae_ter
 * @property integer $id_nat_jur
 * @property integer $id_tip_ter
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property integer $codigo
 * @property string $razon_soc
 * @property string $cam_com
 * @property string $pnombre
 * @property string $snombre
 * @property integer $estado_ter
 * @property timestamp $fecha_doc
 * @property string $papellido
 * @property string $sapellido
 * @property string $nmatricula
 * @property string $nmatriculamer
 * @property string $profesion
 * @property integer $dv
 * @property string $objetivo
 * @property INTERCER_TIP $INTERCER_TIP
 * @property TIPO_IDENTIFICACION $TIPO_IDENTIFICACION
 * @property TS_NAT_JUR $TS_NAT_JUR
 * @property Doctrine_Collection $INTERCER_CON
 * @property Doctrine_Collection $INTERCER_CON_2
 * @property Doctrine_Collection $INTERCER_DG_JUR
 * @property Doctrine_Collection $INTERCER_DG_JUR_2
 * @property Doctrine_Collection $INTERCER_DT
 * @property Doctrine_Collection $INTERCER_DU
 * @property Doctrine_Collection $INTERCER_REG
 * @property Doctrine_Collection $PR_PG
 * @property Doctrine_Collection $PR_RP
 * @property Doctrine_Collection $RE_DESCUENTOS
 * @property Doctrine_Collection $RE_LOG
 * @property Doctrine_Collection $RH_NP_CON_NOM
 * @property Doctrine_Collection $TR_DIS_VAL
 * @property Doctrine_Collection $TS_ACT_BEN_REG
 * @property Doctrine_Collection $TS_ACT_BEN_REG_3
 * @property Doctrine_Collection $TS_EMISION_PAGO
 * @property Doctrine_Collection $TS_MB_DEDUCCIONES
 * @property Doctrine_Collection $TS_MOV_BANC
 * @property Doctrine_Collection $TS_NOT_DEDUCCIONES
 * @property Doctrine_Collection $TS_NOT_TESO
 * @property Doctrine_Collection $TS_OBLIGA_ACREE_DISTRI
 * @property Doctrine_Collection $TS_OBLIGACION_APORTES
 * @property Doctrine_Collection $TS_RC
 * @property Doctrine_Collection $TS_RC_DEDUCCIONES
 * @property Doctrine_Collection $TS_REG_ACH
 * @property Doctrine_Collection $TS_REG_ACH_DISTRI
 * @property Doctrine_Collection $TS_SALDOS_ACR
 * @property Doctrine_Collection $CM_EMISION_PAGO
 * @property Doctrine_Collection $CM_MOV_BANC
 * @property Doctrine_Collection $CM_SALDOS_ACR
 * @property Doctrine_Collection $CA_FACTURA_POS
 * @property Doctrine_Collection $RE_OBL_DETALLE
 * @property Doctrine_Collection $RE_OBLIGACION
 * @property Doctrine_Collection $CA_DEBITO
 * @property Doctrine_Collection $CA_DEBITO_6
 * @property Doctrine_Collection $CA_CREDITO
 * @property Doctrine_Collection $CA_EJECUTIVO_CUENTA
 * @property Doctrine_Collection $CA_LOG
 * @property Doctrine_Collection $RE_DES_PAGO
 * @property Doctrine_Collection $RE_DES_PAGO_2
 * @property Doctrine_Collection $RE_BENE_AUTORIZA
 * @property Doctrine_Collection $RE_RECAUDO
 * @property Doctrine_Collection $CA_FACTURA_POS_TEMP
 * @property Doctrine_Collection $CA_EXCEDENTES
 * 
 * @method integer             getIdMaeTer()               Returns the current record's "id_mae_ter" value
 * @method integer             getIdNatJur()               Returns the current record's "id_nat_jur" value
 * @method integer             getIdTipTer()               Returns the current record's "id_tip_ter" value
 * @method integer             getIdTipoDoc()              Returns the current record's "id_tipo_doc" value
 * @method string              getNumDoc()                 Returns the current record's "num_doc" value
 * @method integer             getCodigo()                 Returns the current record's "codigo" value
 * @method string              getRazonSoc()               Returns the current record's "razon_soc" value
 * @method string              getCamCom()                 Returns the current record's "cam_com" value
 * @method string              getPnombre()                Returns the current record's "pnombre" value
 * @method string              getSnombre()                Returns the current record's "snombre" value
 * @method integer             getEstadoTer()              Returns the current record's "estado_ter" value
 * @method timestamp           getFechaDoc()               Returns the current record's "fecha_doc" value
 * @method string              getPapellido()              Returns the current record's "papellido" value
 * @method string              getSapellido()              Returns the current record's "sapellido" value
 * @method string              getNmatricula()             Returns the current record's "nmatricula" value
 * @method string              getNmatriculamer()          Returns the current record's "nmatriculamer" value
 * @method string              getProfesion()              Returns the current record's "profesion" value
 * @method integer             getDv()                     Returns the current record's "dv" value
 * @method string              getObjetivo()               Returns the current record's "objetivo" value
 * @method INTERCER_TIP        getINTERCERTIP()            Returns the current record's "INTERCER_TIP" value
 * @method TIPO_IDENTIFICACION getTIPOIDENTIFICACION()     Returns the current record's "TIPO_IDENTIFICACION" value
 * @method TS_NAT_JUR          getTSNATJUR()               Returns the current record's "TS_NAT_JUR" value
 * @method Doctrine_Collection getINTERCERCON()            Returns the current record's "INTERCER_CON" collection
 * @method Doctrine_Collection getINTERCERCON2()           Returns the current record's "INTERCER_CON_2" collection
 * @method Doctrine_Collection getINTERCERDGJUR()          Returns the current record's "INTERCER_DG_JUR" collection
 * @method Doctrine_Collection getINTERCERDGJUR2()         Returns the current record's "INTERCER_DG_JUR_2" collection
 * @method Doctrine_Collection getINTERCERDT()             Returns the current record's "INTERCER_DT" collection
 * @method Doctrine_Collection getINTERCERDU()             Returns the current record's "INTERCER_DU" collection
 * @method Doctrine_Collection getINTERCERREG()            Returns the current record's "INTERCER_REG" collection
 * @method Doctrine_Collection getPRPG()                   Returns the current record's "PR_PG" collection
 * @method Doctrine_Collection getPRRP()                   Returns the current record's "PR_RP" collection
 * @method Doctrine_Collection getREDESCUENTOS()           Returns the current record's "RE_DESCUENTOS" collection
 * @method Doctrine_Collection getRELOG()                  Returns the current record's "RE_LOG" collection
 * @method Doctrine_Collection getRHNPCONNOM()             Returns the current record's "RH_NP_CON_NOM" collection
 * @method Doctrine_Collection getTRDISVAL()               Returns the current record's "TR_DIS_VAL" collection
 * @method Doctrine_Collection getTSACTBENREG()            Returns the current record's "TS_ACT_BEN_REG" collection
 * @method Doctrine_Collection getTSACTBENREG3()           Returns the current record's "TS_ACT_BEN_REG_3" collection
 * @method Doctrine_Collection getTSEMISIONPAGO()          Returns the current record's "TS_EMISION_PAGO" collection
 * @method Doctrine_Collection getTSMBDEDUCCIONES()        Returns the current record's "TS_MB_DEDUCCIONES" collection
 * @method Doctrine_Collection getTSMOVBANC()              Returns the current record's "TS_MOV_BANC" collection
 * @method Doctrine_Collection getTSNOTDEDUCCIONES()       Returns the current record's "TS_NOT_DEDUCCIONES" collection
 * @method Doctrine_Collection getTSNOTTESO()              Returns the current record's "TS_NOT_TESO" collection
 * @method Doctrine_Collection getTSOBLIGAACREEDISTRI()    Returns the current record's "TS_OBLIGA_ACREE_DISTRI" collection
 * @method Doctrine_Collection getTSOBLIGACIONAPORTES()    Returns the current record's "TS_OBLIGACION_APORTES" collection
 * @method Doctrine_Collection getTSRC()                   Returns the current record's "TS_RC" collection
 * @method Doctrine_Collection getTSRCDEDUCCIONES()        Returns the current record's "TS_RC_DEDUCCIONES" collection
 * @method Doctrine_Collection getTSREGACH()               Returns the current record's "TS_REG_ACH" collection
 * @method Doctrine_Collection getTSREGACHDISTRI()         Returns the current record's "TS_REG_ACH_DISTRI" collection
 * @method Doctrine_Collection getTSSALDOSACR()            Returns the current record's "TS_SALDOS_ACR" collection
 * @method Doctrine_Collection getCMEMISIONPAGO()          Returns the current record's "CM_EMISION_PAGO" collection
 * @method Doctrine_Collection getCMMOVBANC()              Returns the current record's "CM_MOV_BANC" collection
 * @method Doctrine_Collection getCMSALDOSACR()            Returns the current record's "CM_SALDOS_ACR" collection
 * @method Doctrine_Collection getCAFACTURAPOS()           Returns the current record's "CA_FACTURA_POS" collection
 * @method Doctrine_Collection getREOBLDETALLE()           Returns the current record's "RE_OBL_DETALLE" collection
 * @method Doctrine_Collection getREOBLIGACION()           Returns the current record's "RE_OBLIGACION" collection
 * @method Doctrine_Collection getCADEBITO()               Returns the current record's "CA_DEBITO" collection
 * @method Doctrine_Collection getCADEBITO6()              Returns the current record's "CA_DEBITO_6" collection
 * @method Doctrine_Collection getCACREDITO()              Returns the current record's "CA_CREDITO" collection
 * @method Doctrine_Collection getCAEJECUTIVOCUENTA()      Returns the current record's "CA_EJECUTIVO_CUENTA" collection
 * @method Doctrine_Collection getCALOG()                  Returns the current record's "CA_LOG" collection
 * @method Doctrine_Collection getREDESPAGO()              Returns the current record's "RE_DES_PAGO" collection
 * @method Doctrine_Collection getREDESPAGO2()             Returns the current record's "RE_DES_PAGO_2" collection
 * @method Doctrine_Collection getREBENEAUTORIZA()         Returns the current record's "RE_BENE_AUTORIZA" collection
 * @method Doctrine_Collection getRERECAUDO()              Returns the current record's "RE_RECAUDO" collection
 * @method Doctrine_Collection getCAFACTURAPOSTEMP()       Returns the current record's "CA_FACTURA_POS_TEMP" collection
 * @method Doctrine_Collection getCAEXCEDENTES()           Returns the current record's "CA_EXCEDENTES" collection
 * @method INTERCEROS          setIdMaeTer()               Sets the current record's "id_mae_ter" value
 * @method INTERCEROS          setIdNatJur()               Sets the current record's "id_nat_jur" value
 * @method INTERCEROS          setIdTipTer()               Sets the current record's "id_tip_ter" value
 * @method INTERCEROS          setIdTipoDoc()              Sets the current record's "id_tipo_doc" value
 * @method INTERCEROS          setNumDoc()                 Sets the current record's "num_doc" value
 * @method INTERCEROS          setCodigo()                 Sets the current record's "codigo" value
 * @method INTERCEROS          setRazonSoc()               Sets the current record's "razon_soc" value
 * @method INTERCEROS          setCamCom()                 Sets the current record's "cam_com" value
 * @method INTERCEROS          setPnombre()                Sets the current record's "pnombre" value
 * @method INTERCEROS          setSnombre()                Sets the current record's "snombre" value
 * @method INTERCEROS          setEstadoTer()              Sets the current record's "estado_ter" value
 * @method INTERCEROS          setFechaDoc()               Sets the current record's "fecha_doc" value
 * @method INTERCEROS          setPapellido()              Sets the current record's "papellido" value
 * @method INTERCEROS          setSapellido()              Sets the current record's "sapellido" value
 * @method INTERCEROS          setNmatricula()             Sets the current record's "nmatricula" value
 * @method INTERCEROS          setNmatriculamer()          Sets the current record's "nmatriculamer" value
 * @method INTERCEROS          setProfesion()              Sets the current record's "profesion" value
 * @method INTERCEROS          setDv()                     Sets the current record's "dv" value
 * @method INTERCEROS          setObjetivo()               Sets the current record's "objetivo" value
 * @method INTERCEROS          setINTERCERTIP()            Sets the current record's "INTERCER_TIP" value
 * @method INTERCEROS          setTIPOIDENTIFICACION()     Sets the current record's "TIPO_IDENTIFICACION" value
 * @method INTERCEROS          setTSNATJUR()               Sets the current record's "TS_NAT_JUR" value
 * @method INTERCEROS          setINTERCERCON()            Sets the current record's "INTERCER_CON" collection
 * @method INTERCEROS          setINTERCERCON2()           Sets the current record's "INTERCER_CON_2" collection
 * @method INTERCEROS          setINTERCERDGJUR()          Sets the current record's "INTERCER_DG_JUR" collection
 * @method INTERCEROS          setINTERCERDGJUR2()         Sets the current record's "INTERCER_DG_JUR_2" collection
 * @method INTERCEROS          setINTERCERDT()             Sets the current record's "INTERCER_DT" collection
 * @method INTERCEROS          setINTERCERDU()             Sets the current record's "INTERCER_DU" collection
 * @method INTERCEROS          setINTERCERREG()            Sets the current record's "INTERCER_REG" collection
 * @method INTERCEROS          setPRPG()                   Sets the current record's "PR_PG" collection
 * @method INTERCEROS          setPRRP()                   Sets the current record's "PR_RP" collection
 * @method INTERCEROS          setREDESCUENTOS()           Sets the current record's "RE_DESCUENTOS" collection
 * @method INTERCEROS          setRELOG()                  Sets the current record's "RE_LOG" collection
 * @method INTERCEROS          setRHNPCONNOM()             Sets the current record's "RH_NP_CON_NOM" collection
 * @method INTERCEROS          setTRDISVAL()               Sets the current record's "TR_DIS_VAL" collection
 * @method INTERCEROS          setTSACTBENREG()            Sets the current record's "TS_ACT_BEN_REG" collection
 * @method INTERCEROS          setTSACTBENREG3()           Sets the current record's "TS_ACT_BEN_REG_3" collection
 * @method INTERCEROS          setTSEMISIONPAGO()          Sets the current record's "TS_EMISION_PAGO" collection
 * @method INTERCEROS          setTSMBDEDUCCIONES()        Sets the current record's "TS_MB_DEDUCCIONES" collection
 * @method INTERCEROS          setTSMOVBANC()              Sets the current record's "TS_MOV_BANC" collection
 * @method INTERCEROS          setTSNOTDEDUCCIONES()       Sets the current record's "TS_NOT_DEDUCCIONES" collection
 * @method INTERCEROS          setTSNOTTESO()              Sets the current record's "TS_NOT_TESO" collection
 * @method INTERCEROS          setTSOBLIGAACREEDISTRI()    Sets the current record's "TS_OBLIGA_ACREE_DISTRI" collection
 * @method INTERCEROS          setTSOBLIGACIONAPORTES()    Sets the current record's "TS_OBLIGACION_APORTES" collection
 * @method INTERCEROS          setTSRC()                   Sets the current record's "TS_RC" collection
 * @method INTERCEROS          setTSRCDEDUCCIONES()        Sets the current record's "TS_RC_DEDUCCIONES" collection
 * @method INTERCEROS          setTSREGACH()               Sets the current record's "TS_REG_ACH" collection
 * @method INTERCEROS          setTSREGACHDISTRI()         Sets the current record's "TS_REG_ACH_DISTRI" collection
 * @method INTERCEROS          setTSSALDOSACR()            Sets the current record's "TS_SALDOS_ACR" collection
 * @method INTERCEROS          setCMEMISIONPAGO()          Sets the current record's "CM_EMISION_PAGO" collection
 * @method INTERCEROS          setCMMOVBANC()              Sets the current record's "CM_MOV_BANC" collection
 * @method INTERCEROS          setCMSALDOSACR()            Sets the current record's "CM_SALDOS_ACR" collection
 * @method INTERCEROS          setCAFACTURAPOS()           Sets the current record's "CA_FACTURA_POS" collection
 * @method INTERCEROS          setREOBLDETALLE()           Sets the current record's "RE_OBL_DETALLE" collection
 * @method INTERCEROS          setREOBLIGACION()           Sets the current record's "RE_OBLIGACION" collection
 * @method INTERCEROS          setCADEBITO()               Sets the current record's "CA_DEBITO" collection
 * @method INTERCEROS          setCADEBITO6()              Sets the current record's "CA_DEBITO_6" collection
 * @method INTERCEROS          setCACREDITO()              Sets the current record's "CA_CREDITO" collection
 * @method INTERCEROS          setCAEJECUTIVOCUENTA()      Sets the current record's "CA_EJECUTIVO_CUENTA" collection
 * @method INTERCEROS          setCALOG()                  Sets the current record's "CA_LOG" collection
 * @method INTERCEROS          setREDESPAGO()              Sets the current record's "RE_DES_PAGO" collection
 * @method INTERCEROS          setREDESPAGO2()             Sets the current record's "RE_DES_PAGO_2" collection
 * @method INTERCEROS          setREBENEAUTORIZA()         Sets the current record's "RE_BENE_AUTORIZA" collection
 * @method INTERCEROS          setRERECAUDO()              Sets the current record's "RE_RECAUDO" collection
 * @method INTERCEROS          setCAFACTURAPOSTEMP()       Sets the current record's "CA_FACTURA_POS_TEMP" collection
 * @method INTERCEROS          setCAEXCEDENTES()           Sets the current record's "CA_EXCEDENTES" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseINTERCEROS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('INTERCEROS');
        $this->hasColumn('id_mae_ter', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_nat_jur', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tip_ter', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_doc', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('num_doc', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('codigo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('razon_soc', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('cam_com', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('pnombre', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('snombre', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('estado_ter', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('fecha_doc', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('papellido', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('sapellido', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('nmatricula', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('nmatriculamer', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('profesion', 'string', 50, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 50,
             ));
        $this->hasColumn('dv', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('objetivo', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('INTERCER_TIP', array(
             'local' => 'id_tip_ter',
             'foreign' => 'id_tip_ter'));

        $this->hasOne('TIPO_IDENTIFICACION', array(
             'local' => 'id_tipo_doc',
             'foreign' => 'id_tipo_identificacion'));

        $this->hasOne('TS_NAT_JUR', array(
             'local' => 'id_nat_jur',
             'foreign' => 'id_nat_jur'));

        $this->hasMany('INTERCER_CON', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('INTERCER_CON as INTERCER_CON_2', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter_con'));

        $this->hasMany('INTERCER_DG_JUR', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('INTERCER_DG_JUR as INTERCER_DG_JUR_2', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter_jur'));

        $this->hasMany('INTERCER_DT', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('INTERCER_DU', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('INTERCER_REG', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('PR_PG', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('PR_RP', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('RE_DESCUENTOS', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RE_LOG', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RH_NP_CON_NOM', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TR_DIS_VAL', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TS_ACT_BEN_REG', array(
             'local' => 'id_mae_ter',
             'foreign' => 'identificacion'));

        $this->hasMany('TS_ACT_BEN_REG as TS_ACT_BEN_REG_3', array(
             'local' => 'id_mae_ter',
             'foreign' => 'dueno_cuenta'));

        $this->hasMany('TS_EMISION_PAGO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TS_MB_DEDUCCIONES', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TS_MOV_BANC', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TS_NOT_DEDUCCIONES', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TS_NOT_TESO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('TS_OBLIGA_ACREE_DISTRI', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('TS_OBLIGACION_APORTES', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('TS_RC', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('TS_RC_DEDUCCIONES', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('TS_REG_ACH', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('TS_REG_ACH_DISTRI', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('TS_SALDOS_ACR', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('CM_EMISION_PAGO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CM_MOV_BANC', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CM_SALDOS_ACR', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_tercero'));

        $this->hasMany('CA_FACTURA_POS', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RE_OBL_DETALLE', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RE_OBLIGACION', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_DEBITO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_DEBITO as CA_DEBITO_6', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter_ven'));

        $this->hasMany('CA_CREDITO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_EJECUTIVO_CUENTA', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_LOG', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RE_DES_PAGO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter_acree'));

        $this->hasMany('RE_DES_PAGO as RE_DES_PAGO_2', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RE_BENE_AUTORIZA', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('RE_RECAUDO', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_FACTURA_POS_TEMP', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_EXCEDENTES', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));
    }
}