问题
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