From dac1ce4172b006540b91e2fe12d916a52de33885 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 22 Aug 2017 21:21:53 +0200 Subject: [PATCH] #6284 removing profile entity, since it is not needed to reproduce the issue --- .../ORM/Functional/Ticket/GH6217Test.php | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php index be9ea2a74..8f11d6de3 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php @@ -14,7 +14,6 @@ final class GH6217Test extends OrmFunctionalTestCase $this->_schemaTool->createSchema( [ $this->_em->getClassMetadata(GH6217User::class), - $this->_em->getClassMetadata(GH6217Profile::class), $this->_em->getClassMetadata(GH6217Category::class), $this->_em->getClassMetadata(GH6217UserProfile::class), ] @@ -27,13 +26,11 @@ final class GH6217Test extends OrmFunctionalTestCase public function testRetrievingCacheShouldNotThrowUndefinedIndexException() { $user = new GH6217User(); - $profile = new GH6217Profile(); $category = new GH6217Category(); - $userProfile = new GH6217UserProfile($user, $profile, $category); + $userProfile = new GH6217UserProfile($user, $category); $this->_em->persist($category); $this->_em->persist($user); - $this->_em->persist($profile); $this->_em->persist($userProfile); $this->_em->flush(); $this->_em->clear(); @@ -63,18 +60,6 @@ class GH6217User } } -/** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */ -class GH6217Profile -{ - /** @Id @Column(type="string") @GeneratedValue(strategy="NONE") */ - public $id; - - public function __construct() - { - $this->id = uniqid(self::class, true); - } -} - /** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */ class GH6217Category { @@ -93,16 +78,12 @@ class GH6217UserProfile /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217User::class) */ public $user; - /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Profile::class, fetch="EAGER") */ - public $profile; - /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Category::class, fetch="EAGER") */ public $category; - public function __construct(GH6217User $user, GH6217Profile $profile, GH6217Category $category) + public function __construct(GH6217User $user, GH6217Category $category) { $this->user = $user; - $this->profile = $profile; $this->category = $category; } }