#6284 removing profile entity, since it is not needed to reproduce the issue
This commit is contained in:
parent
ca39abcd71
commit
dac1ce4172
@ -14,7 +14,6 @@ final class GH6217Test extends OrmFunctionalTestCase
|
|||||||
$this->_schemaTool->createSchema(
|
$this->_schemaTool->createSchema(
|
||||||
[
|
[
|
||||||
$this->_em->getClassMetadata(GH6217User::class),
|
$this->_em->getClassMetadata(GH6217User::class),
|
||||||
$this->_em->getClassMetadata(GH6217Profile::class),
|
|
||||||
$this->_em->getClassMetadata(GH6217Category::class),
|
$this->_em->getClassMetadata(GH6217Category::class),
|
||||||
$this->_em->getClassMetadata(GH6217UserProfile::class),
|
$this->_em->getClassMetadata(GH6217UserProfile::class),
|
||||||
]
|
]
|
||||||
@ -27,13 +26,11 @@ final class GH6217Test extends OrmFunctionalTestCase
|
|||||||
public function testRetrievingCacheShouldNotThrowUndefinedIndexException()
|
public function testRetrievingCacheShouldNotThrowUndefinedIndexException()
|
||||||
{
|
{
|
||||||
$user = new GH6217User();
|
$user = new GH6217User();
|
||||||
$profile = new GH6217Profile();
|
|
||||||
$category = new GH6217Category();
|
$category = new GH6217Category();
|
||||||
$userProfile = new GH6217UserProfile($user, $profile, $category);
|
$userProfile = new GH6217UserProfile($user, $category);
|
||||||
|
|
||||||
$this->_em->persist($category);
|
$this->_em->persist($category);
|
||||||
$this->_em->persist($user);
|
$this->_em->persist($user);
|
||||||
$this->_em->persist($profile);
|
|
||||||
$this->_em->persist($userProfile);
|
$this->_em->persist($userProfile);
|
||||||
$this->_em->flush();
|
$this->_em->flush();
|
||||||
$this->_em->clear();
|
$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") */
|
/** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */
|
||||||
class GH6217Category
|
class GH6217Category
|
||||||
{
|
{
|
||||||
@ -93,16 +78,12 @@ class GH6217UserProfile
|
|||||||
/** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217User::class) */
|
/** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217User::class) */
|
||||||
public $user;
|
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") */
|
/** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Category::class, fetch="EAGER") */
|
||||||
public $category;
|
public $category;
|
||||||
|
|
||||||
public function __construct(GH6217User $user, GH6217Profile $profile, GH6217Category $category)
|
public function __construct(GH6217User $user, GH6217Category $category)
|
||||||
{
|
{
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->profile = $profile;
|
|
||||||
$this->category = $category;
|
$this->category = $category;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user