mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
json_array type generate unexpected/unwanted column comment: (DC2Type:json_array) #6764
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alex-eptb on GitHub (Jun 22, 2021).
Hi,
An unwanted comment '(DC2Type:json_array)' is generated when setting json_array type with annotation.
FYI, if I add my own comment, '(DC2Type:json_array)' is appended to it.
Expected result: no comment.
Way/test to reproduce:
Here is the unexpected migration result:
@beberlei commented on GitHub (Jun 22, 2021):
While you find this comment unwanted, it is necessary to make our Schema Tool work, so this is the expected behavior.
However, maybe you should look into the
jsonDBAL type, which is a more modern version of the deprecatedjson_arraytype. It uses the underlying json datatype and should not require the comment to my knowledge. This requires a recent DBAL version such as 2.13@alex-eptb commented on GitHub (Jun 23, 2021):
Really? Storing orm stuff in table comment looks pretty hacky to me. :)
Thanks for this advice anyway. Json type is the correct way.