Ticket #1044: multiplerelations.php

File multiplerelations.php, 0.9 KB (added by jasoneisen, 22 months ago)
Line 
1<?php
2
3/**
4 * This class has been auto-generated by the Doctrine ORM Framework
5 */
6abstract class BaseAclCreatesRole extends Doctrine_Record
7{
8
9        public function setTableDefinition()
10        {
11                $this->setTableName('acl_creates_role');
12               
13                $this->hasColumn('acl_role_id', 'integer', 1, array(
14                        'unsigned'              =>      true,
15                        'primary'               =>      true,
16                        'notnull'               =>      true,
17                        'autoincrement' =>      false));
18               
19                $this->hasColumn('acl_creates_id', 'integer', 1, array(
20                        'unsigned'              =>      true,
21                        'primary'               =>      true,
22                        'notnull'               =>      true,
23                        'autoincrement' =>      false));
24        }
25
26        public function setUp()
27        {
28                parent::setUp();
29               
30                $this->hasOne('AclRole', array(
31                        'local'         =>      'acl_role_id',
32                        'foreign'       =>      'acl_role_id',
33                        'onDelete'      =>      'CASCADE',
34                        'onUpdate'      =>      'CASCADE'));
35                       
36                $this->hasOne('AclRole', array(
37                        'local'         =>      'acl_creates_id',
38                        'foreign'       =>      'acl_role_id',
39                        'onDelete'      =>      'CASCADE',
40                        'onUpdate'      =>      'CASCADE'));
41        }
42
43}