diff --git a/workflow.rst b/workflow.rst index f3f04b3feea..6722a9851f3 100644 --- a/workflow.rst +++ b/workflow.rst @@ -283,6 +283,15 @@ if you are using Doctrine, the matching column definition should use the type `` this Doctrine type will store its value only as a string, resulting in the loss of the object's current place. +.. tip:: + + On a database level, querying or filtering for multiple state marking stores + requires special handling. When using Doctrine with MySQL, you can install + `scienta/doctrine-json-functions` and enable the `JSON_CONTAINS_PATH` doctrine + function. Then you can filter for a current place as follows: + ``$qb->andWhere("JSON_CONTAINS_PATH(item.currentPlaces, 'one', '$.draft') <> 0")`` + (where `draft` is the place to be checked) + Accessing the Workflow in a Class ---------------------------------