MyUserGroup.php 559 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<?php
class MyUserGroup extends Doctrine_Record
{
    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');
    }
}