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

14 lines
535 B
PHP

<?php
class QueryTest_User extends Doctrine_Entity
{
public static function initMetadata($class)
{
$class->setColumn('username as username', 'string', 50,
array('notnull'));
$class->setColumn('visibleRankId', 'integer', 4);
$class->hasOne('QueryTest_Rank as visibleRank', array('local' => 'visibleRankId', 'foreign' => 'id'));
$class->hasMany('QueryTest_Rank as ranks', array('local' => 'userId', 'foreign' => 'rankId', 'refClass' => 'QueryTest_UserRank'));
}
}