Skip to content

Commit de4ec20

Browse files
committed
Mention PostgreSQL jsonb as a reason to favor json over simple_array
1 parent df014a7 commit de4ec20

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

docs/en/reference/basic-mapping.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,11 @@ automatically during hydration and persistence.
394394
.. tip::
395395

396396
Use ``json`` when enum values may contain commas, when you need to store
397-
int-backed enums (as it preserves value types), or when the column also
398-
stores complex/nested data structures. Prefer ``simple_array`` for a
399-
compact, human-readable storage of string-backed enums whose values do not
400-
contain commas.
397+
int-backed enums (as it preserves value types), when the column also
398+
stores complex/nested data structures, or when you want to query individual
399+
values using database-native JSON operators (e.g. PostgreSQL ``jsonb``).
400+
Prefer ``simple_array`` for a compact, human-readable storage of
401+
string-backed enums whose values do not contain commas.
401402

402403
+-------------------+-----------------------------+-------------------------------+
403404
| Column type | Database storage | PHP type |

0 commit comments

Comments
 (0)