示例#1
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Address', array('local' => 'user_id', 'foreign' => 'address_id', 'refClass' => 'EntityAddress'));
     $this->hasMany('Address as Addresses', array('local' => 'user_id', 'foreign' => 'address_id', 'refClass' => 'EntityAddress'));
     $this->hasMany('Album', array('local' => 'id', 'foreign' => 'user_id'));
     $this->hasMany('Book', array('local' => 'id', 'foreign' => 'user_id'));
     $this->hasMany('Group', array('local' => 'user_id', 'foreign' => 'group_id', 'refClass' => 'Groupuser'));
 }
示例#2
0
 public function setUp()
 {
     parent::setUp();
     $this->hasOne('sfGuardUser as User', array('local' => 'user_id', 'foreign' => 'id', 'onDelete' => 'SET NULL'));
     $this->hasOne('Company', array('local' => 'parent_id', 'foreign' => 'id', 'onDelete' => 'SET NULL'));
 }
示例#3
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('User', array('local' => 'group_id', 'foreign' => 'user_id', 'refClass' => 'Groupuser'));
 }
 /**
  * {@inheritdoc}
  */
 public function setUp()
 {
     parent::setUp();
     $this->init();
 }
示例#5
0
 public function setUp()
 {
     parent::setUp();
     $this->hasMany('Person as People', array('local' => 'id', 'foreign' => 'parent_id'));
 }