Skip to content

Commit

Permalink
README: Use attributes in example.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Jul 16, 2021
1 parent 207696f commit 52f7fb9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,14 @@ namespace Baraja\Doctrine\Entity;
use Doctrine\ORM\Mapping as ORM;
use Nette\SmartObject;
use Baraja\Doctrine\UUID\UuidBinaryIdentifier;
use Baraja\Doctrine\Identifier\IdentifierUnsigned;
/**
* @ORM\Entity()
*/
#[ORM\Entity]
class DatabaseEntity
{
use UuidBinaryIdentifier; // <--- UUID trait for entity identifier.
use SmartObject; // <--- Strict class for better experience.
use IdentifierUnsigned; // ID trait for entity identifier.
// or use uuid:
// use UuidIdentifier; // UUID identifier trait
```

UUID will be generated automatically in PHP.
Expand Down

0 comments on commit 52f7fb9

Please sign in to comment.