Extract the pivot model creation to the related model for customization.