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

Soft-delete with orWhere doesn't return results #43

Closed
rms2219 opened this issue Sep 19, 2013 · 4 comments
Closed

Soft-delete with orWhere doesn't return results #43

rms2219 opened this issue Sep 19, 2013 · 4 comments

Comments

@rms2219
Copy link

rms2219 commented Sep 19, 2013

The following query yields many results:

$query = '%'.Input::get('q').'%';
return Contract::where('contractNumber', 'like', $query)->get();

But this query returns ZERO results...if anything, shouldn't it only return more results?

$query = '%'.Input::get('q').'%';
return Contract::where('contractNumber', 'like', $query)->orWhere('customerId', 'like', $query)->get();

"Contract" has $softDelete = 'true', and as soon as I turned that off, my orWhere clauses worked again

@jenssegers
Copy link
Contributor

The soft delete functionality was not overwritten by this library, I don't really know what could be causing this issue.

@rms2219
Copy link
Author

rms2219 commented Sep 19, 2013

OK I can look into the issue further on the Laravel issue tracker.

@rms2219 rms2219 closed this as completed Sep 23, 2013
@jenssegers
Copy link
Contributor

Did you solve the problem?

@rms2219
Copy link
Author

rms2219 commented Sep 23, 2013

I did not...I just closed it so that it wasn't in your issue tracker any more since you said the functionality wasn't overwritten by this library.

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