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

Fix OneToOne reverse relation Doctrine fallback query #250

Merged

Conversation

soullivaneuh
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Has tests? yes

The foreign column name was used on a classic Doctrine find.

Two issues:

  • This method expects an identifier. So we have to get the repository to use findOneBy method instead.
  • The findOneBy method expects fieldName, not column name. So primary field array is introduced.

I target the 1.0 branch because it's a bugfix of introduced feature in #227.

You can push the new patch release after this PR. 👍

The foreign column name was used on a classic Doctrine find.

Two issues:

* This method expects an identifier. So we have to get the repository to use findOneBy method instead.
* The findOneBy method expects fieldName, not column name. So primary field array is introduced.
@soullivaneuh
Copy link
Member Author

BTW, this PR must be merged to master after that.

@DavidBadura
Copy link
Contributor

thanks!

@DavidBadura DavidBadura merged commit 95a11b9 into sonata-project:1.0 Jan 13, 2017
@soullivaneuh soullivaneuh deleted the reverse-to-one-relation-fix branch January 13, 2017 10:18
@DavidBadura
Copy link
Contributor

@soullivaneuh
Copy link
Member Author

soullivaneuh commented Jan 13, 2017

Thank you @DavidBadura!

@soullivaneuh
Copy link
Member Author

soullivaneuh commented Jan 27, 2017

@DavidBadura
Copy link
Contributor

@soullivaneuh Thanks for the hint! Version 1.0.2 should solved this.

@soullivaneuh
Copy link
Member Author

Thanks @DavidBadura. I just upgraded to 1.0.2, works correctly. 👍

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.

None yet

2 participants