Error updating a customer

The query BusinessPartner.GetPartnerbyNumber crosses the JobSite. When updating the BusinessPartner the JobSite is updated with the name of the BusinessPartner. This happens when the BusinessPartner has JobSite associated with it.