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

Searching by related entities leads to errors with embeddables #2065

Closed
digilist opened this issue Feb 21, 2018 · 3 comments
Closed

Searching by related entities leads to errors with embeddables #2065

digilist opened this issue Feb 21, 2018 · 3 comments
Labels
bug help wanted Issues and PRs which are looking for volunteers to complete them. status: confirmed

Comments

@digilist
Copy link

Since version 1.17.11, with the introduction of searching in related entities (see #1910 and #1991), there is an DQL error (Class .... has no association named ....) when there are embedded entities in the relation. The easyadmin tries to join the embedded entity.

@javiereguiluz
Copy link
Collaborator

I'm sorry about this! If someone knows Doctrine well, please send a pull request to fix this. Thank you!

@javiereguiluz javiereguiluz added the help wanted Issues and PRs which are looking for volunteers to complete them. label Feb 21, 2018
@yceruto
Copy link
Collaborator

yceruto commented Feb 21, 2018

There is a public property Doctrine\ORM\Mapping\ClassMetadataInfo::$embeddedClasses with the names of all embedded classes based on properties. Otherwise you could check by Doctrine\ORM\Mapping\ClassMetadataInfo::$associationMappings to make sure it's an association field.

@javiereguiluz
Copy link
Collaborator

I'm closing this issue because we're starting a new phase in the history of this bundle (see #2059). We've moved it into a new GitHub organization and we need to start from scratch: no past issues, no pending pull requests, etc.

I understand if you are angry or disappointed by this, but we really need to "reset" everything in order to reignite the development of this bundle.

javiereguiluz added a commit that referenced this issue Oct 9, 2018
This PR was squashed before being merged into the 1.x branch (closes #2209).

Discussion
----------

Allow embeddables 1 x

As discussed in #2065 , search with embeddables made the QueryBuilder fail, as it was treating them like Doctrine associations.

The changes in this PR corrects this behaviour, by using a more precise method of testing if a field is a Doctrine association

Commits
-------

6433cea Allow embeddables 1 x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted Issues and PRs which are looking for volunteers to complete them. status: confirmed
Projects
None yet
Development

No branches or pull requests

3 participants