handling of main relations in contactcontroller