-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathBulletin.php
51 lines (43 loc) · 1.11 KB
/
Bulletin.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
App::uses('AppModel', 'Model');
/**
* Bulletin Model
*
* @property Election $Election
*/
class Bulletin extends AppModel {
/**
* Display field
*
* @var string
*/
public $displayField = 'name';
//The Associations below have been created with all possible keys, those that are not needed can be removed
/**
* hasAndBelongsToMany associations
*
* @var array
*/
public $hasAndBelongsToMany = array(
'Election' => array(
'className' => 'Election',
'joinTable' => 'bulletins_elections',
'foreignKey' => 'Bulletin_id',
'associationForeignKey' => 'Election_id',
'unique' => 'keepExisting',
'conditions' => '',
'fields' => '',
'order' => '',
'limit' => '',
'offset' => '',
'finderQuery' => '',
),
);
public $hasMany = array(
'BulletinsElection' => array(
'foreignKey' => 'Election_id',
'dependent' => true,
'className' => 'BulletinsElection',
),
);
}