Skip to content

populated model is not updated #129

@davibe

Description

@davibe

This is my model definition

schema = mongoose.Schema
  name: String
  parents: [{type: mongoose.Schema.Types.ObjectId, ref: 'Category'}]
  children: [{type: mongoose.Schema.Types.ObjectId, ref: 'Category'}]

model = mongoose.model('Category', schema)

model.formage =
  is_single: false
  list_populate: ['parents', 'children']
  search: ['parents', 'name']
  list: ['name', 'parents', 'children']

module.exports = model

I have created a "root" category and a "subcategory". The subcategory has "root" as one of its parents. If i change the name of the "root" category to "root name changed", the name is not updated in the populated models. Here are 2 sshots

name changed
screenshot 2015-10-21 11 19 37

populated values
screenshot 2015-10-21 11 19 53

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions