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

Add a unit test for testing nested relationships with soft deleted records. #2

Merged

Conversation

maqduni
Copy link
Contributor

@maqduni maqduni commented Mar 10, 2018

Added the requested unit test as was requested in jarektkaczyk/eloquence#220. If you don't like the idea of filtering out deleted records inside of a join then a way to exclude softly deleted records would be adding 'where "posts"."deleted_at" is null '; at the end of the statement.

I also thought it might make sense to have a sort of withTrashed scope that would enable search across deleted records. Let me know your thoughts about it, I'll also be thinking about a better way to do it if it at least makes sense...

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

Successfully merging this pull request may close these issues.

2 participants