1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/models/TestMovie.php

28 lines
848 B
PHP
Raw Normal View History

<?php
class TestMovie extends Doctrine_Record
{
public function setUp()
{
$this->hasOne('TestUser as User',
array('local' => 'user_id',
'foreign' => 'id'));
$this->hasMany('TestUser as MovieBookmarks',
array('local' => 'movie_id',
'foreign' => 'user_id',
'refClass' => 'TestMovieUserBookmark'));
$this->hasMany('TestUser as MovieVotes',
array('local' => 'movie_id',
'foreign' => 'user_id',
'refClass' => 'TestMovieUserVote'));
}
public function setTableDefinition()
{
$this->hasColumn('user_id', 'integer', null);
$this->hasColumn('name', 'string', 30);
}
}