From 4e0b76ce693ea401fbb6e5e8ccd5546e35c8c783 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 22 Aug 2017 21:14:38 +0200 Subject: [PATCH] #6284 eager fetching is strictly required to verify the issue --- .../ORM/Functional/Ticket/GH6217Test.php | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php index 26e2c80ad..2afed3db7 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php @@ -54,7 +54,13 @@ final class GH6217Test extends OrmFunctionalTestCase /** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */ class GH6217User { - /** @Id @Column(type="string") @GeneratedValue(strategy="NONE") */ + /** + * @Id + * @Column(type="string") + * @GeneratedValue(strategy="NONE") + * + * @var string + */ public $id; public function __construct() @@ -66,7 +72,13 @@ class GH6217User /** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */ class GH6217Profile { - /** @Id @Column(type="string") @GeneratedValue(strategy="NONE") */ + /** + * @Id + * @Column(type="string") + * @GeneratedValue(strategy="NONE") + * + * @var string + */ public $id; public function __construct() @@ -78,7 +90,13 @@ class GH6217Profile /** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */ class GH6217Category { - /** @Id @Column(type="string") @GeneratedValue(strategy="NONE") */ + /** + * @Id + * @Column(type="string") + * @GeneratedValue(strategy="NONE") + * + * @var string + */ public $id; public function __construct() @@ -93,10 +111,10 @@ class GH6217UserProfile /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217User::class) */ public $user; - /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Profile::class) */ + /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Profile::class, fetch="EAGER") */ public $profile; - /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Category::class) */ + /** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Category::class, fetch="EAGER") */ public $category; public function __construct(GH6217User $user, GH6217Profile $profile, GH6217Category $category)