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')); }
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')); }
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')); }
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')); }
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')); }
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')); }
public function setUp() { parent::setUp(); $this->hasOne('Company as company', array('local' => 'companyid', 'foreign' => 'id')); }
/** * 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')); }
public function setUp() { parent::setUp(); # member being audited $this->hasOne('UserAccount as user', array('local' => 'userid', 'foreign' => 'id')); }