<?php
namespace App\Model\Table;

use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;

class MapDivisionSectionTable extends Table
{

    public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setTable('mapdivisionsection');
        $this->setDisplayField('division_id,section_id');
        $this->setPrimaryKey('id');

        $this->addBehavior('Timestamp');

        $this->belongsTo('Division', [
            'foreignKey' => 'division_id'
        ]);
        $this->hasMany('Section', [
            'foreignKey' => 'id'
        ]);
       
    }

  
}
