Should primary keys of MySQL tables be exposed?

后端 未结 6 1390
天涯浪人
天涯浪人 2021-01-02 10:38

I have a number of MySQL tables describing models such as \"User\", \"Business\" etc. Should the primary keys of these tables ever be exposed to the client-side? I am asking

6条回答
  •  庸人自扰
    2021-01-02 11:15

    It is generally considered a bad idea to expose the autoincrement keys. Domain primary keys are fine.

提交回复
热议问题