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

26 lines
831 B
PHP

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