Fixed issue with assumption that foreign keys always points to an integer field called by getID()
Added a testcase for one-to-many relationship with two string-based join columns