Skip to content

Add MorphMany relation to replaced whereIn method. #1871

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

Merged
merged 2 commits into from
Jan 27, 2020

Conversation

Majed6
Copy link
Contributor

@Majed6 Majed6 commented Nov 13, 2019

A mere rebase of #1776 . See that PR for details

@Smolevich
Copy link
Contributor

Smolevich commented Jan 20, 2020

Merge actual master, please

@Majed6
Copy link
Contributor Author

Majed6 commented Jan 21, 2020

Just did. @Smolevich Could you please advise me on Codacy check ?

@rennokki
Copy link
Contributor

@Majed6 I assume your use case is a model that extends the mongo model and has $keyType set to integer and the key name is not _id? Because i seek for the whereInMethod across the relations, and it seems like this is the line where it might use whereIntegerInRaw and not whereIn, right?

https://github.com/laravel/framework/blob/6.x/src/Illuminate/Database/Eloquent/Relations/Relation.php#L317

@Majed6
Copy link
Contributor Author

Majed6 commented Jan 26, 2020

@rennokki I apologize for the delayed response. I'm using mongodb with owen-it /
laravel-auditing
and the function with('audits') did not work for me with audited models until I applied this change.

@rennokki
Copy link
Contributor

@Majed6 Merge with the current master branch.

AsemAlalami and others added 2 commits January 27, 2020 08:32
(cherry picked from commit 1115bf5)
@Majed6
Copy link
Contributor Author

Majed6 commented Jan 27, 2020

@rennokki Just did. Will this get merged anytime soon ? 😄

@rennokki
Copy link
Contributor

@Smolevich

{
return 'whereIn';
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Smolevich Smolevich self-assigned this Jan 27, 2020
@Smolevich Smolevich merged commit 20fd7b0 into mongodb:master Jan 27, 2020
@Majed6
Copy link
Contributor Author

Majed6 commented Jan 27, 2020

Hooray 🎉 . Thanks y'all. Don't forget to close this Duplicate PR

mnphpexpert added a commit to mnphpexpert/laravel-mongodb that referenced this pull request Sep 2, 2024
 Add MorphMany relation to replaced whereIn method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants