mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 17:33:15 +02:00
DDC-719: Error in SQL subquery for a ManyToMany selfreferencing enitity when using the SIZE() or IS EMPTY dql function #890
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jul 25, 2010).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user steffenvogel:
I have an entity (Group) with a self-referencing ManyToMany association (parents, children).
Now im just trying to query all groups without a parent.
My DQL:
throws this PDOException:
Here is my Group Entitiy:
@doctrinebot commented on GitHub (Jul 25, 2010):
Comment created by @beberlei:
Looks like abug in the SQL Walker.
btw, you can use $e->getTraceAsString() to get a nice looking output for an exception. Its not as verbose as var_dump on the exception
@doctrinebot commented on GitHub (Aug 3, 2010):
Comment created by @guilhermeblanco:
No, it is a bug on ClassMetadata.
The var_dump on Association of parents refers to a NULL on joinTable.
Problem seems to be deeper. I am creating a test case, will figure it out soon.
@doctrinebot commented on GitHub (Aug 3, 2010):
Comment created by @guilhermeblanco:
Ok, it seems that on Mapping drivers we don't map jointables on opposite side.
So, if you map something on inversedBy and you grab the association from mappedBy side, you'll never have the jointable definition, because it is not exported to us.
This seems like a bug flaw we have on our code... not at the point of a critical, but we need to fix it asap.
@doctrinebot commented on GitHub (Aug 3, 2010):
Comment created by romanb:
That the jointable info is only on the owning side is by design, not a flaw.
@doctrinebot commented on GitHub (Aug 3, 2010):
Comment created by @guilhermeblanco:
Path to DDC-719 aswell as a possible issue with collection member implementation.
@doctrinebot commented on GitHub (Aug 6, 2010):
Comment created by @guilhermeblanco:
In http://github.com/doctrine/doctrine2/commit/35af98260a525a841c05be15f52f8df455000066 I committed a fix to this issue.
Should be working now =)
@doctrinebot commented on GitHub (Aug 7, 2010):
Comment created by romanb:
Reopening in order to correct the fixed version.
@doctrinebot commented on GitHub (Aug 7, 2010):
Comment created by romanb:
Closing with correct version.
@doctrinebot commented on GitHub (Aug 7, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Dec 13, 2015):
Imported 1 attachments from Jira into https://gist.github.com/f81a0fd9ff2c735d7967