From ef73249bc7a3cc1ebbb03621225b83237d33a2ea Mon Sep 17 00:00:00 2001 From: neoglez Date: Mon, 21 Sep 2015 09:32:54 +0200 Subject: [PATCH] Entity to test a mapped superclass Backport of https://github.com/doctrine/doctrine2/pull/1377/files to branch 2.5 --- .../Tools/Pagination/PaginationTestCase.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php b/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php index f1553c13c..f1e56ff0c 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php +++ b/tests/Doctrine/Tests/ORM/Tools/Pagination/PaginationTestCase.php @@ -168,4 +168,22 @@ class Avatar public $image_width; /** @Column(type="string", length=255) */ public $image_alt_desc; -} \ No newline at end of file +} + +/** @MappedSuperclass */ +abstract class Identified +{ + /** @Id @Column(type="integer") @GeneratedValue */ + private $id; + public function getId() + { + return $this->id; + } +} + +/** @Entity */ +class Banner extends Identified +{ + /** @Column(type="string") */ + public $name; +}