fixed formatting
This commit is contained in:
parent
78f683d855
commit
9a4f9e2768
1 changed files with 12 additions and 11 deletions
|
@ -99,29 +99,30 @@ class mmrUser_C extends Doctrine_Record
|
||||||
public function setUp()
|
public function setUp()
|
||||||
{
|
{
|
||||||
$this->hasMany('mmrGroup_C as Group', array('local' => 'user_id',
|
$this->hasMany('mmrGroup_C as Group', array('local' => 'user_id',
|
||||||
'foreign' => 'group_id',
|
'foreign' => 'group_id',
|
||||||
'refClass' => 'mmrGroupUser_C'));
|
'refClass' => 'mmrGroupUser_C'));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTableDefinition()
|
public function setTableDefinition()
|
||||||
{
|
{
|
||||||
// Works when
|
// Works when
|
||||||
$this->hasColumn('g_id as id', 'string', 30, array ( 'primary' => true));
|
$this->hasColumn('u_id as id', 'string', 30, array('primary' => true));
|
||||||
$this->hasColumn('name', 'string', 30);
|
$this->hasColumn('name', 'string', 30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class mmrGroup_C extends Doctrine_Record
|
class mmrGroup_C extends Doctrine_Record
|
||||||
{
|
{
|
||||||
public function setUp() {
|
public function setUp()
|
||||||
|
{
|
||||||
$this->hasMany('mmrUser_C', array('local' => 'group_id',
|
$this->hasMany('mmrUser_C', array('local' => 'group_id',
|
||||||
'foreign' => 'user_id',
|
'foreign' => 'user_id',
|
||||||
'refClass' => 'mmrGroupUser_C'));
|
'refClass' => 'mmrGroupUser_C'));
|
||||||
}
|
}
|
||||||
public function setTableDefinition() {
|
public function setTableDefinition()
|
||||||
// Works when
|
{
|
||||||
$this->hasColumn('u_id as id', 'string', 30, array ( 'primary' => true));
|
$this->hasColumn('g_id as id', 'string', 30, array('primary' => true));
|
||||||
$this->hasColumn('name', 'string', 30);
|
$this->hasColumn('name', 'string', 30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue