Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

path id moongose #24

Open
gollodev opened this issue Jun 9, 2015 · 2 comments
Open

path id moongose #24

gollodev opened this issue Jun 9, 2015 · 2 comments

Comments

@gollodev
Copy link

gollodev commented Jun 9, 2015

moongose unique index _id not id.

@0x1211
Copy link
Contributor

0x1211 commented Sep 30, 2016

@gollodev If I got you you would replace references to *.id by *._id.

Here it can be id depending on the context. Here you don't need to manipulate an ObjectId which is the type of _id and if you compare it to a string the equality test would fail.
So using id is fine.

Read more on http://mongoosejs.com/docs/guide.html#id

Hope this helped :)

@summersblue
Copy link

// app/models/user.js
I change it to mysql, and everything is ok, but this page, user.js, I can do nothing about
"
var userSchema = mongoose.Schema({

local            : {
    email        : String,
    password     : String
},

"

could you give me some advice to change it to mysql?
my email: [email protected]

Thanks deeply.
Regards.

Denny

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants