set relationships to nil if null in representation