As @SpawnCxy said, you need to use the 'fields' => array(...) option in find to restrict the data you want to get. If you don't want to do this every time you write find , you can add something like this to your beforeFind() model beforeFind() , which will automatically fill the field parameters with all fields except the longtext field:
function beforeFind($query) { if (!isset($query['fields'])) { foreach ($this->_schema as $field => $foo) { if ($field == 'longtextfield') { continue; } $query['fields'][] = $this->alias . '.' . $field; } } return $query; }
Regarding the comment:
That's true ... The easiest way in this case is probably to remove the field from the schema.
unset($this->Model->_schema['longtextfield']);
I have not tested it, but this should prevent the inclusion of the field in the request. If you want to make it switchable for each request, you can transfer it to another variable of type $Model->_schemaInactiveFields and move it if necessary. You can even do Behavior for this.
source share