Bueno, quedo resulto, habia que definir el modelo... algo asi:
Código Javascript
:
Ver originalvar mongoose = require('mongoose'),
Schema = mongoose.Schema;
//Listado de paises
var countrySchema = new Schema({
name:{ type: String }
});
//Usuarios del sistema
var userSchema = new Schema({
full_name:{ type: String },
username: { type: String, required: true, index: { unique: true }},
email: { type: String, required: true, index: { unique: true } },
password: { type: String, required: true },
birthday: { type: String },
country: { type : Schema.Types.ObjectId, ref : 'Country' },
genre: { type: String, enum: ['Female', 'Male'] }
});
var Country = mongoose.model('Country', countrySchema, 'CountryModel');
var User = mongoose.model('User', userSchema, 'UserModel');
exports.Country = Country;
exports.User = User;