hasMany('Photo', 'Phototag.photo_id'); } public function setTableDefinition() { $this->hasColumn('tag', 'string', 100); } }