1040 fix relations in models

should fix #1040 
Style/FileName: Use snake_case for source file names.