Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

the data of mongodb "id" and "_id" is not both need when createTable #4716

Closed
huang12zheng opened this issue Jul 3, 2019 · 0 comments · Fixed by #4720
Closed

the data of mongodb "id" and "_id" is not both need when createTable #4716

huang12zheng opened this issue Jul 3, 2019 · 0 comments · Fixed by #4720
Assignees

Comments

@huang12zheng
Copy link

huang12zheng commented Jul 3, 2019

Is your feature request related to a problem? Please describe.
I'm always frustrated when I createUser like as follow 1, and mongodb would be as follow 2

Due to I need to reset id

# follow 1
createAccess(data:{
    	  id: "5d1ccb5ad229dd0008ef3de0", #<<--------------------
        mobile: "17681953826",
        password: "",
        userName: "ZSH",
        email: "805104534@qq.com",
        identity: { create: { identityNo: "",
        identityType: IDCARD
        }},
    }){
    id
    userName
  }
# follow 2
{
    "_id" : ObjectId("5d1ccb5ad229dd0008ef3de0"),
    "id" : ObjectId("5d1ccb5ad229dd0008ef3de0"),
    "mobile" : "17681953826",
    "email" : "805104534@qq.com",
    "userName" : "ZSH",
    "password" : "",
    "identity" : {
        "identityNo" : "35222519920815XXXX",
        "identityType" : "IDCARD",
        "_id" : ObjectId("5d1ccb8cd229dd0008ef3de2")
    }
}

Describe the solution you'd like

the data mongodb should just have "_id", not id

@huang12zheng huang12zheng changed the title the data of mongodb "id" and "_id" is not need the data of mongodb "id" and "_id" is not both need when createTable Jul 3, 2019
@do4gr do4gr self-assigned this Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants