Skip to content

Commit

Permalink
Rename tables to avoid pg related illegal table name
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Mar 16, 2024
1 parent 6501890 commit 1b6cf58
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Expand Up @@ -10,11 +10,12 @@

/**
* @ORM\Entity()
* @ORM\Table(name="abstract_fetch_eager_remote_control")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="type", type="string")
* @ORM\DiscriminatorMap({"mobile"="MobileRemoteControl"})
*/
abstract class AbstractRemoveControl
abstract class AbstractRemoteControl
{
/**
* @ORM\Id
Expand Down
Expand Up @@ -9,6 +9,6 @@
/**
* @ORM\Entity()
*/
class MobileRemoteControl extends AbstractRemoveControl
class MobileRemoteControl extends AbstractRemoteControl
{
}
7 changes: 4 additions & 3 deletions tests/Tests/Models/AbstractFetchEager/User.php
Expand Up @@ -8,6 +8,7 @@

/**
* @ORM\Entity()
* @ORM\Table(name="abstract_fetch_eager_user")
*/
class User
{
Expand All @@ -21,14 +22,14 @@ class User
public $id;

/**
* @ORM\ManyToOne(targetEntity="AbstractRemoveControl", inversedBy="users")
* @ORM\ManyToOne(targetEntity="AbstractRemoteControl", inversedBy="users")
* @ORM\JoinColumn(nullable=false)
*
* @var AbstractRemoveControl
* @var AbstractRemoteControl
*/
public $remoteControl;

public function __construct(AbstractRemoveControl $control)
public function __construct(AbstractRemoteControl $control)
{
$this->remoteControl = $control;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/ORM/Functional/AbstractFetchEagerTest.php
Expand Up @@ -4,7 +4,7 @@

namespace Doctrine\Tests\ORM\Functional;

use Doctrine\Tests\Models\AbstractFetchEager\AbstractRemoveControl;
use Doctrine\Tests\Models\AbstractFetchEager\AbstractRemoteControl;
use Doctrine\Tests\Models\AbstractFetchEager\MobileRemoteControl;
use Doctrine\Tests\Models\AbstractFetchEager\User;
use Doctrine\Tests\OrmFunctionalTestCase;
Expand All @@ -14,7 +14,7 @@ final class AbstractFetchEagerTest extends OrmFunctionalTestCase
public function testWithAbstractFetchEager(): void
{
$this->createSchemaForModels(
AbstractRemoveControl::class,
AbstractRemoteControl::class,
User::class
);

Expand Down

0 comments on commit 1b6cf58

Please sign in to comment.