TDI-30222 : fix some problems of relationship