瀏覽代碼

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' })
 			}
 		}
 	})