예제 #1
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('UserAccount as user', array('local' => 'userid', 'foreign' => 'id'));
     $this->hasOne('UserAccount as addedby', array('local' => 'addedbyid', 'foreign' => 'id'));
     $this->hasOne('Shift as session', array('local' => 'sessionid', 'foreign' => 'id'));
 }
예제 #2
0
 public function setUp()
 {
     parent::setUp();
     // automatically set timestamp column values for datecreated and lastupdatedate
     $this->actAs('Timestampable', array('created' => array('name' => 'datecreated'), 'updated' => array('name' => 'lastupdatedate', 'onInsert' => false, 'options' => array('notnull' => false))));
     // created by
     $this->hasOne('UserAccount as creator', array('local' => 'createdby', 'foreign' => 'id'));
     $this->hasOne('UserAccount as updator', array('local' => 'lastupdatedby', 'foreign' => 'id'));
 }
예제 #3
0
 public function setUp()
 {
     parent::setUp();
     // automatically set timestamp on datecreated
     $this->actAs('Timestampable', array('created' => array('name' => 'datecreated'), 'updated' => array('name' => 'datecreated', 'onInsert' => false, 'options' => array('notnull' => false))));
     $this->hasOne('Message as parent', array('local' => 'parentid', 'foreign' => 'id'));
     $this->hasOne('UserAccount as sender', array('local' => 'senderid', 'foreign' => 'id'));
     $this->hasMany('MessageRecipient as recipients', array('local' => 'id', 'foreign' => 'messageid'));
 }
예제 #4
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('UserAccount as user', array('local' => 'userid', 'foreign' => 'id'));
     $this->hasOne('AclGroup as group', array('local' => 'groupid', 'foreign' => 'id'));
 }
예제 #5
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Payroll as payroll', array('local' => 'payrollid', 'foreign' => 'id'));
     $this->hasOne('UserAccount as user', array('local' => 'userid', 'foreign' => 'id'));
 }
예제 #6
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Message as message', array('local' => 'messageid', 'foreign' => 'id'));
     $this->hasOne('UserAccount as recipient', array('local' => 'recipientid', 'foreign' => 'id'));
 }
예제 #7
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Company as company', array('local' => 'companyid', 'foreign' => 'id'));
 }
예제 #8
0
 /**
  * Model relationships
  */
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('Person as person', array('local' => 'personid', 'foreign' => 'id'));
     $this->hasOne('Member as user', array('local' => 'userid', 'foreign' => 'id'));
 }
예제 #9
0
 public function setUp()
 {
     parent::setUp();
     # member being audited
     $this->hasOne('UserAccount as user', array('local' => 'userid', 'foreign' => 'id'));
 }