Extract association method for inferring a model's foreign key