File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class MyEnumType extends \NeutronStars\Enum\Types\EnumType {
36
36
}
37
37
```
38
38
39
- And you must add this to the ` doctrine.yaml ` configuration file:
39
+ You must add this to the ` doctrine.yaml ` configuration file:
40
40
41
41
``` yml
42
42
doctrine :
@@ -46,4 +46,21 @@ doctrine:
46
46
class : App\Types\MyEnumType
47
47
` ` `
48
48
49
+
50
+ On the annotation that contains the field of your entity, you must put the type:
51
+
52
+ ` ` ` php
53
+ /**
54
+ * @ORM\Column(type="my_enum")
55
+ * @var MyEnum|null
56
+ */
57
+ private ?MyEnum $myEnum;
58
+ ```
59
+
60
+ you must comment out the column that contains the enum during your sql migration:
61
+
62
+ ``` php
63
+ $this->addSql('COMMENT ON COLUMN "your_table"."your_column" IS \'(DC2Type:my_enum)\';');
64
+ ```
65
+
49
66
---
You can’t perform that action at this time.
0 commit comments