Beispiel #1
0
 /**
  * Initialize method
  *
  * @param array $config The configuration for the Table.
  * @return void
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->table('experiences');
     $this->displayField('id');
     $this->primaryKey('id');
     $this->addBehavior('Timestamp');
     $this->belongsTo('Tutors', ['foreignKey' => 'tutor_id', 'joinType' => 'INNER', 'className' => 'Tutor.Tutors']);
 }
Beispiel #2
0
 /**
  * Initialize method
  *
  * @param array $config The configuration for the Table.
  * @return void
  */
 public function initialize(array $config)
 {
     parent::initialize($config);
     $this->table('tutors');
     $this->displayField('user_id');
     $this->primaryKey('id');
     $this->addBehavior('Timestamp');
     $this->hasMany('Experiences', ['foreignKey' => 'tutor_id', 'className' => 'Tutor.Experiences']);
     $this->_setAppRelations(Configure::read('tutor_plugin.relations'));
 }