Entity to test a mapped superclass
Backport of https://github.com/doctrine/doctrine2/pull/1377/files to branch 2.5
This commit is contained in:
parent
ed637e51b9
commit
ef73249bc7
@ -169,3 +169,21 @@ class Avatar
|
|||||||
/** @Column(type="string", length=255) */
|
/** @Column(type="string", length=255) */
|
||||||
public $image_alt_desc;
|
public $image_alt_desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @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;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user