stream-node-orm icon indicating copy to clipboard operation
stream-node-orm copied to clipboard

Actor prop author not found on model instance

Open emmanuelAjako opened this issue 6 years ago • 0 comments

here's my code `export const ArticleSchema = new Schema( { slug: {type: String, lowercase: true, unique: true}, title: { type: String, required: true, }, body: { type: String, required: true, }, description: { type: String, }, likes: {type: Number, default: 0}, tagList: [{ type: String}], author:{ type: mongoose.Schema.Types.ObjectId, ref: 'User', autopopulate:true }, comments: [{ body:{ type: String, maxlength: 280}, commenter: { type: mongoose.Schema.Types.ObjectId, ref: "User", autopopulate:true}, commentedAt:Date, replies:[{ reply:{ type: String, default: "", maxlength: 280}, replyAuthor:{type:mongoose.Schema.Types.ObjectId, ref:'User'} }] }], } ); ArticleSchema.plugin(stream.mongoose.activity);

ArticleSchema.methods.activityActorProp = function() { return 'author'; }`

emmanuelAjako avatar Dec 26 '18 20:12 emmanuelAjako