use reflection to get foreign_key