-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Alias for Lookup with Relationship #2172
Conversation
Thanks for your contribution! This needs a little more work:
Please let me know if you need help with any of the above! |
Thanks @alcaeus , I'll do the corrections that you pointed. |
146e337
to
8cd36c3
Compare
530ae70
to
317a8f7
Compare
@alcaeus , checks my updates please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are lots of unrelated changes in this PR regarding indentation. Please refrain from changing the coding style on unrelated changes. If your IDE is doing this automatically, please tell it to stop doing that 😉
As for the tests, those look good so far. The two classes you introduced aren't necessary. For the mapping changes, was the storeAs
attribute required to make tests pass? Inverse references shouldn't care about their own storeAs
, as they're defined by the storeAs
value of the owning side. If the test fails without this mapping, this points to a different problem with the lookup implementation (which I'd have to debug separately).
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/ODM/MongoDB/Tests/Aggregation/Stage/LookupTest.php
Outdated
Show resolved
Hide resolved
@alcaeus , request changes done. Thanks for the review and advice. |
@josemiguelq there are some more indentation changes that you haven't changed back. Please go through those and make sure to not have any unrelated changes in. The rest looks good 👍 |
Sorry @alcaeus, indentation changes done. Its IDE default behavior |
Thanks @josemiguelq! Note: travis-ci completed successfully but did not correctly report the status to GitHub. |
Summary
According to the documentation of Mongo the
as
can't be null because contains the matching documents from the from collection.(https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/#lookup-join-as).
To prevent error the keys will be the same of the Documents using "mappedBy" and the foreignKey will be the same of attribute "name".