setColumn('type', 'string',100); $class->hasMany('Resource as ResourceAlias', array('local' => 'type_id', 'foreign' => 'resource_id', 'refClass' => 'ResourceReference')); } }