2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
2008-05-14 01:20:34 +04:00
|
|
|
class MyUserGroup extends Doctrine_Entity
|
2007-09-02 18:24:49 +04:00
|
|
|
{
|
|
|
|
public function setTableDefinition()
|
|
|
|
{
|
|
|
|
$this->setTableName('my_user_group');
|
|
|
|
|
|
|
|
$this->hasColumn('id', 'integer', 4, array ( 'primary' => true, 'autoincrement' => true,));
|
|
|
|
$this->hasColumn('group_id', 'integer', 4, array ());
|
|
|
|
$this->hasColumn('user_id', 'integer', 4, array ());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
$this->hasOne('MyGroup as MyGroup', 'MyUserGroup.group_id');
|
|
|
|
$this->hasOne('MyUser as MyUser', 'MyUserGroup.user_id');
|
|
|
|
}
|
|
|
|
}
|