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

Question: Access to parent? #105

Open
LimitTech opened this issue Apr 13, 2016 · 2 comments
Open

Question: Access to parent? #105

LimitTech opened this issue Apr 13, 2016 · 2 comments

Comments

@LimitTech
Copy link

Hello, I have

Parent.class:
@List...
List<Child> children;

Is there any way to access to parent from a child?

Child child = new RushSearch().findSingle(Child);
child.parent ???

Thanks

@ghost
Copy link

ghost commented Apr 15, 2016

Hi,

A simple RushSearch can do this.

Parent parent = new RushSearch.whereEqual("children", child).findSingle(Parent.class);

Thanks

@LimitTech
Copy link
Author

Thank you!

Maybe it is common enough to be in the FAQ, I think.

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

No branches or pull requests

1 participant