Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
fre5h committed Aug 27, 2022
1 parent 714a0f7 commit 4448ef6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Resources/docs/null_values.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
`NULL` values are also supported by ENUM field. You can set *nullable* parameter of column to `true` or `false` depends on if you want or not to allow `NULL` values:

```php
#[ORM\Column(type: BasketballPositionType::class, nullable: true)]
#[ORM\Column(type: 'BasketballPositionType', nullable: true)]
private $position;

// or

#[ORM\Column(type: BasketballPositionType::class, nullable: false)]
#[ORM\Column(type: 'BasketballPositionType', nullable: false)]
private $position;
```

Expand Down
2 changes: 1 addition & 1 deletion Resources/docs/usage_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Player
private $id;
// Note, that type of field should be same as you set in Doctrine config (in this case it is BasketballPositionType)
#[ORM\Column(type: BasketballPositionType::class)]
#[ORM\Column(type: 'BasketballPositionType')]
#[DoctrineAssert\EnumType(entity: BasketballPositionType::class)]
private $position;
Expand Down

0 comments on commit 4448ef6

Please sign in to comment.