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

Scopes don't work as expected in relations #23

Open
mallchin opened this issue Jun 29, 2017 · 2 comments
Open

Scopes don't work as expected in relations #23

mallchin opened this issue Jun 29, 2017 · 2 comments

Comments

@mallchin
Copy link

When strict mode is off rejected items are excluded by default through a global scope on the boot method. This is to be expected, however, it doesn't appear possible to include them using the withRejected() local scope.

$user->persona->withRejected()->first(); returns null if persona is rejected as the global scope supersedes the local one; the where status != 2 clause excludes rejected records despite the local scope where status in (1,2) including them.

@hootlex
Copy link
Owner

hootlex commented Jun 29, 2017

Hey,

Thanks for reporting this issue.
Could you please open a pr with a failing test? That would be very useful.

@mallchin
Copy link
Author

Sure, will do.

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