1040 fix relations in models

should fix #1040 
Metrics/LineLength: Line is too long. [82/80]