Why Realm don't support auto increment primary key?

此生再无相见时 提交于 2019-12-13 17:14:40

问题


Is there some pros or cons to not implement that feature?

I know some solutions exist and that it's on there road maps but are there any advantages behind that decision that we are not award of?


回答1:


In a discussion on Github (see realm/realm-cocoa#2591) the Realm team said there are no plans for support any auto increment field, even if there's a few lines of code a developer can use for implementing this feature as you said.

From a Realm member in the discussion:

We decided that we're not going to support this feature, because we would be unable to support it with simultaneous access from multiple processes.

So that's it.



来源:https://stackoverflow.com/questions/40289738/why-realm-dont-support-auto-increment-primary-key

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!