I have the follwing simple MySQL query that returns 0 results:
SELECT d.name FROM document d WHERE 10 IN (d.categories)
"categories" is of type varchar and contains for example "10,20,30".
When I type the IN values directly it works and returns a result:
SELECT d.name FROM document d WHERE 10 IN (10,20,30)
I suspect MySQL substitutes d.documents with something like this which of course is not what I want:
SELECT d.name FROM document d WHERE 10 IN ("10,20,30")
What is a proper workaround for this?