So I noticed in the CakePHP 4 documentation their isnt a way to use find on JSON field values in a JSON mySQL column. Every time i try to explain what I'm doing it seems to get lost somewhere in translation so I'll explain what I need to happen:
Find entries based on a JSON column value. So in my table i have a json column named "additional_info", inside "additional_info" there are multiple json field values, for example: {1:{org_id:"",name:"", etc. In order to find what i need, i need to be able to set a condition based on the json field values org_id; if i set a condition with addition_info.org_id = 1, show all the records where 1 is located in the tables json column.
I have been stuck on this for multiple days and haven't found a good way to accomplish this. I have messed with the beforeFind in the model, behaviors, traits and collections. I believe my problem is solved with one of the methods i was messing with, but if not any examples on this would be much appreciated!
If able, i would like this to be set in the table model, as to make the change global.(i am not concerned with this)