Relaciones Mongodb

15 views
Skip to first unread message

Renee Ortiz Vasquez

unread,
Jan 20, 2014, 12:05:36 PM1/20/14
to mongod...@googlegroups.com
buenos días, tengo una duda espero puedan ayudarme a aclararla.
yo manejo una colección Persona con sus datos personales, hobbies, una lista de amigos, y comentarios de las noticias.
como podría realizar una sección donde se vea los comentarios de todos mis amigos ordenados por fechas.

var Persona = new mongoose.Schema({
    email:     { type: String },
    password:  { type: String },    
    name: {
      first:   { type: String },
      last:    { type: String },
      full:    { type: String }
    },
    contactos:{
        idContact: { type: ObjectId },
        name: {
               first:   { type: String },
               last:    { type: String },
               full:    { type: String }
         }
    },
    comentario:{
 ...
    }
});

Atte,
Celular: 991771582
Desarrollador Web - Frontend
Renee Ortiz Vasquez


Reply all
Reply to author
Forward
0 new messages