-
Notifications
You must be signed in to change notification settings - Fork 58
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
Primary key is not "id" #101
Comments
On your example, you've basically named the primary key "user_id". If you want a primary key with the "id" field name :
|
and I would like to name the primary key as "user_id". The problem is, when I make a HTTP GET call to |
If you want to use an id key that is not app.use('/messages', service({
id: 'user_id',
Model: db,
name: 'messages'
})); |
well it works in
Any idea? |
Are you sure? This functionality is being explicitly tested here. |
I'm going to close this since setting a different id should be supported as mentioned in the comments and we don't have enough additional information to reproduce the issue. |
Sorry but I still not able to fix it. I would like to highlight the endpoint that I call is to
again the |
Can you share a repository to reproduce the issue? |
I tried to declare the user table as:
but when I do a HTTP GET call to the server
/user/1
I got the error
Expected result
the user record would be shown accordingly.
The text was updated successfully, but these errors were encountered: