Move getRelatedVarName() to base Table.

Signed-off-by: Toha <tohenk@yahoo.com>
Fix Doctrine2 YAML interchanged foreign keys.

Signed-off-by: Toha <tohenk@yahoo.com>