Skip to content

Instantly share code, notes, and snippets.

@wazum
Created November 14, 2020 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wazum/f612a732e73fc190b7d58be910470396 to your computer and use it in GitHub Desktop.
Save wazum/f612a732e73fc190b7d58be910470396 to your computer and use it in GitHub Desktop.
Person entity with nullable EmailAddress value object
<?php
declare(strict_types=1);
namespace App\Something\Domain\Entity;
/**
* @ORM\Entity
*/
class Person extends DomainEntity
{
/**
* @ORM\Embedded(class="App\Something\Domain\ValueObject\EmailAddress", columnPrefix=false)
*/
protected ?EmailAddress $emailAddress = null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment