1
0
mirror of synced 2024-12-14 15:16:04 +03:00
doctrine2/tests/Doctrine/Tests/Models/DDC964/DDC964Admin.php

47 lines
1.3 KiB
PHP
Raw Normal View History

2011-12-14 22:28:01 +04:00
<?php
namespace Doctrine\Tests\Models\DDC964;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity
* @AssociationOverrides({
* @AssociationOverride(name="groups",
* joinTable=@JoinTable(
* name="ddc964_users_admingroups",
* joinColumns=@JoinColumn(name="adminuser_id"),
* inverseJoinColumns=@JoinColumn(name="admingroup_id")
* )
* ),
* @AssociationOverride(name="address",
* joinColumns=@JoinColumn(
* name="adminaddress_id", referencedColumnName="id"
* )
* )
* })
*/
class DDC964Admin extends DDC964User
{
2012-02-02 06:57:39 +04:00
public static function loadMetadata($metadata)
{
$metadata->setAssociationOverride('address',array(
'joinColumns'=>array(array(
'name' => 'adminaddress_id',
'referencedColumnName' => 'id',
))
));
2011-12-14 22:28:01 +04:00
2012-02-02 06:57:39 +04:00
$metadata->setAssociationOverride('groups',array(
'joinTable' => array(
'name' => 'ddc964_users_admingroups',
'joinColumns' => array(array(
'name' => 'adminuser_id',
)),
'inverseJoinColumns' =>array (array (
'name' => 'admingroup_id',
))
)
));
}
2011-12-14 22:28:01 +04:00
}