These are chat archives for Automattic/mongoose

17th
Aug 2016
awei.yu
@aweiu
Aug 17 2016 05:02

addressCollection:

province:{
    name:'xxProvince:',
    _id:'xxxx',
    city:{
      name:'xxCity'
      _id:'xxx'
    }
}

userCollection:

user:{
 address:{
   ref:"address.city"
 }
}

how to link to address.city by 'ref'?
is it possibale to ref a sub-doc

any one can help me?