Last active
May 12, 2020 19:35
-
-
Save anvodev/9b8a1fb928369ed211c775a2fbe9aea6 to your computer and use it in GitHub Desktop.
Custom Id generator in Customer Entity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //src/Entity/Customer.php | |
| //... | |
| class Customer | |
| { | |
| /** | |
| * @ORM\Id() | |
| * @ORM\GeneratedValue("CUSTOM") | |
| * @ORM\Column(type="integer") | |
| * @ORM\CustomIdGenerator("App\Doctrine\CustomerIdGenerator") | |
| */ | |
| private $id; | |
| //... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment