public function getHasManyReference($table, $targetTable = NULL) { switch ("{$table}:{$targetTable}") { case 'posts:props': return [$targetTable, 'post_id']; } parent::getHasManyReference($table, $targetTable); }