support custom foreign key for has_many relation