Use preg_replace to replace table name with underscore.
Get relation directly since getRelation is just getting an item in array.