1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
abstract class BaseTicketHasNote extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('ticket_has_note');
        $this->hasColumn('note_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
        $this->hasColumn('ticket_id', 'integer', null, array(
             'type' => 'integer',
             'primary' => true,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('Ticket', array(
             'local' => 'ticket_id',
             'foreign' => 'id',
             'onDelete' => 'CASCADE'));
    }
}