Generating sequential numbers in multi-user saas application

后端 未结 6 1816
野趣味
野趣味 2021-02-08 20:52

How do people generate auto_incrementing integers for a particular user in a typical saas application?

For example, the invoice numbers for all the invoices for a partic

6条回答
  •  渐次进展
    2021-02-08 21:39

    Not sure if this is the best solution, but you could store the last Invoice ID on the User and then use that to determine the next ID when creating a new Invoice for that User. But this simple solution may have problems with integrity, will need to be careful.

提交回复
热议问题