Skip to content

Commit

Permalink
Remove inheritance
Browse files Browse the repository at this point in the history
Spotted while trying to merge doctrine#11076
(among other things) up into 3.0.x. On that branch, it is no longer
possible for an entity to extend another entity without specifying an
inheritance mapping type.

I think the goal of that inheritance was just to reuse the identifier
anyway, so let's just duplicate the identifier declaration instead.
  • Loading branch information
greg0ire committed Dec 28, 2023
1 parent ed1df14 commit ebb1010
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@

use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\Id;

/**
* @Entity
*/
class GH11072EntityAdvanced extends GH11072EntityBasic
class GH11072EntityAdvanced
{
/**
* @Id
* @Column(type="integer")
* @GeneratedValue
* @var int
*/
public $id;

/** @Column(type="json") */
public mixed $anything;

Expand Down

0 comments on commit ebb1010

Please sign in to comment.