campo de mangosta con el nombre tipo
Estoy tratando de validar y guardar un perfil de Pasaporte con esta estructura:
Http://passportjs.org/guide/profile /
Este es el esquema que se me ocurrió:
// Define the schema.
schema = new mongoose.Schema({
// The name of this user, suitable for display.
displayName: String,
// Each e-mail address ...
emails: [{
// ... with the actual email address ...
value: String,
// ... and the type of email address (home, work, etc.).
type: String
}],
// A unique identifier for the user, as generated by the service provider.
id: String,
// The name ...
name: {
// ... with the family name of this user, or "last name" in most Western languages ...
familyName: String,
// ... with the given name of this user, or "first name" in most Western languages ...
givenName: String,
// ... and with the middle name of this user.
middleName: String
},
// The provider which with the user authenticated.
provider: String
});
El correo electrónico tiene una propiedad llamada 'type', que está reservada para un tipo mangosta. ¿Cómo resuelvo esto?
30
Author: Roel van Uden, 2013-02-27
1 answers
Necesita definir el campo usando un objeto:
type: {type: String}
83
Author: JohnnyHK,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-02-26 21:51:19
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-02-26 21:51:19