This depends somewhat on how your system is modeled. Are you using EntityManager
to map your classes to tables, or not?
If so, there is a bundle that solves this: link . You say that property is type jsonb
and it does the queries the way the bundle instructs you.
If you are using DBAL, this is already supported, as you can see in the Doctrine mapping table: link
Finally, if none of the solutions above help, you can still use the createNativeQuery
function to perform a native function of that particular database and have an array of results as a return.