mihuoli
V2EX  ›  Node.js

sequelize 如何返回插入自增 id ?

  •  
  •   mihuoli · May 3, 2017 · 7228 views
    This topic created in 3489 days ago, the information mentioned may be changed or developed.

    http://sequelize.readthedocs.io/en/latest/ 找遍了文档 也没解释 英语水平有限 还在努力寻找中

    3 replies  •  2017-05-03 15:21:37 +08:00
    blessyou
    blessyou
    May 3, 2017 via iPhone
    1
    他本来就会有个自增 ID,
    blessyou
    blessyou
    May 3, 2017 via iPhone
    2
    你直接写一个数据就知道了。
    mihuoli
    mihuoli
    OP
    May 3, 2017
    3
    @blessyou 感谢  我尝试写了下的确会会返回 一个对象 刚刚插入行
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   894 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 20:43 · PVG 04:43 · LAX 12:43 · JFK 15:43
    ♥ Do have faith in what you're doing.