Open beginor opened 5 years ago
https://beginor.github.io/2018/08/12/using-snow-flake-id-with-nhibernate.html
这种方式的雪花 ID 在一个事务中插入的记录不能超过1000条, 否则会出现重复的 ID 。
一般也不推荐在一个事务中插入这么大量的数据, 1 是数据库压力太大, 2 是如果事务失败回滚, 大量的数据无法插入。
在 NHibernate 中使用 Snow Flake ID
https://beginor.github.io/2018/08/12/using-snow-flake-id-with-nhibernate.html