setTableName('bar'); $class->setColumn('name', 'string', 200); $class->hasMany('FooRecord as Foo', array('local' => 'barId', 'foreign' => 'fooId', 'refClass' => 'FooBarRecord')); } }