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

"All children where parents.id not in ...."? #318

Open
solars opened this issue Dec 23, 2016 · 2 comments
Open

"All children where parents.id not in ...."? #318

solars opened this issue Dec 23, 2016 · 2 comments

Comments

@solars
Copy link

solars commented Dec 23, 2016

Hi there,

I need to select all Items that do have having their parent (or better root) NOT in a list of objects.
What's the best way to do this? I could do it with LIKE on the ancestry, combined by ORs but that's not really nice..

Thanks a lot

@solars solars changed the title "All children where parents.id in ...."? "All children where parents.id not in ...."? Dec 23, 2016
@kbrock
Copy link
Collaborator

kbrock commented Dec 26, 2016

I don't know how to do this.
I'm guessing a not like may be your best bet.

@solars
Copy link
Author

solars commented Dec 27, 2016

@kbrock hm I think it could also be done with: #280 and negate it? But I'm not sure how this method is called (Rails 4.2)

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

2 participants