These are chat archives for Automattic/mongoose

16th
May 2017
Javeed rahman
@javeedrahman
May 16 2017 13:03
Hi, i am creating a new schema

```// create a schema
var userSchemas = new Schema({
name: { type: String, required: true, unique: true },
username: { type: String, required: true, unique: false},
password: { type: String, required: true, unique: false },
admin: { type: Number, unique: false }
});

// the schema is useless so far
// we need to create a model using it
var User = mongoose.model('rah', userSchemas);
```
after executing this command, when i see the mongo client and my field name looks like name_1, username_1, password_1
_1 was added in the field name.