You can use var_dump
or print_r
to see what your models look like. If you want to quickly do it for all models, modify AppModel
to have it dump the structure when each model loads.
class AppModel extends Model {
function __construct($id = false, $table = null, $ds = null) {
parent::__construct($id, $table, $ds);
$this->log("Model [{$this->name}] belongsTo = " . print_r($this->belongsTo, true), LOG_DEBUG);
$this->log("Model [{$this->name}] hasOne = " . print_r($this->hasOne, true), LOG_DEBUG);
$this->log("Model [{$this->name}] hasMany = " . print_r($this->hasMany, true), LOG_DEBUG);
$this->log("Model [{$this->name}] hasAndBelongsToMany = " . print_r($this->hasAndBelongsToMany, true), LOG_DEBUG);
}
}