Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actually make primary key properties readonly #268

Open
appden opened this issue Feb 19, 2016 · 1 comment
Open

Actually make primary key properties readonly #268

appden opened this issue Feb 19, 2016 · 1 comment

Comments

@appden
Copy link
Contributor

appden commented Feb 19, 2016

I just tested it, and confirmed that I can indeed change a primary key value. However, the docs say this:

Once an object with a primary key is added to a Realm, the primary key cannot be changed.

I actually think we should leave that in the docs and change our behavior to match this. Supposedly, that is what the Cocoa binding does. Also, this change would allow us to move the very old #118 PR forward, since it was blocked on the issue of primary key props being writable.

@cmelchior
Copy link
Contributor

Note that the Java binding allow for the primary key to be changed, but will throw an Exception if you try to change it to a value that already exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants