Skip to content

Commit

Permalink
Use doctrine attributes alongside annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
relthyg committed Apr 3, 2024
1 parent fa293ca commit 5ad8a40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Entity/BaseTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
/**
* @ORM\MappedSuperclass
*/
#[ORM\MappedSuperclass]
class BaseTranslation
{
/**
Expand All @@ -25,19 +26,24 @@ class BaseTranslation
*
* @ORM\Column(type="integer")
*/
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
protected $id;

/**
* @ORM\Column
*
* @PolyglotAnnotation\Locale
*/
#[ORM\Column]
#[Polyglot\Locale]
protected $locale;

/**
* @ORM\JoinColumn(name="entity_id", referencedColumnName="id", nullable=false)
*/
#[ORM\JoinColumn(name: 'entity_id', referencedColumnName: 'id', nullable: false)]
protected $entity;

public function getLocale()
Expand Down

0 comments on commit 5ad8a40

Please sign in to comment.