Open drjaydenm opened 10 years ago
Nice work, I'll have to test this out at some time. You could always do a pull request or whatever as well. I didn't work too hard on containable because containable frankly sucks. It's very slow. It accesses the databases the way a novice programmer would IMO.
Have to fix this for containable search.
// Check that the field is searchable if(isset($this->controller->request->query['bSearchable'.$x]) and $this->controller->request->query['bSearchable'.$x] == 'true')
Also notice that model fields must be at this version like ModelName.field, otherwise there is an error.
Closely related issue #35
I have found that this component does not correctly allow you to search on containable belongsTo fields as it adds the search conditions to the conditions of the model in the containable. I have fixed this as below
It was also not adding the conditions for the base model when using containable which was fixed as below in the getWhereConditions() function