소스 검색

Capitalize association properties

sbkwgh 8 년 전
부모
커밋
e1daf260ee
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      models/post.js

+ 2 - 2
models/post.js

@@ -13,8 +13,8 @@ module.exports = (sequelize, DataTypes) => {
 			associate (models) {
 				Post.belongsTo(models.User)
 				Post.belongsTo(models.Thread)
-				Post.hasMany(models.Post, { as: 'replies' })
-				Post.hasOne(models.Post, { as: 'replyingTo' })
+				Post.hasMany(models.Post, { as: 'Replies' })
+				Post.hasOne(models.Post, { as: 'ReplyingTo' })
 			}
 		}
 	})