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

find method to look up object by primary key #4195

Open
astigsen opened this issue Feb 17, 2017 · 1 comment
Open

find method to look up object by primary key #4195

astigsen opened this issue Feb 17, 2017 · 1 comment

Comments

@astigsen
Copy link

Right now to look up a single object by primary key, you have to make a full query and then do a findFirst().

It would be nice if you could do a direct lookup with a method like:

MyObject obj = realm.find(MyObject.class, objId);

(the Swift, C# and Javascript bindings all have methods like this)

@cmelchior
Copy link
Contributor

This was already partly tracked here: #2166, just called get(). We should probably use the same name as the other bindings though.

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

5 participants