Skip to content

DDC-671: Table aliases wrongly computed with YAML + mappedsuperclasses and joins #5181

@doctrinebot

Description

@doctrinebot

Jira issue originally created by user shurakai:

Affects only YAML. (Maybe also XML? But works with Annotations!)

If there's a relation specified in a mappedSuperclass (manyToOne, towards entity B) and two Entities A and B using this mappedSuperclass, an error occurs within generating the SQL-Query when using a query a la SELECT * FROM A JOIN B ON A.relation = B.id:

This is due to no table name being specified for the mappedSuperclass. (But this tableName is accessed in SqlWalker.php ll. 718. Be aware that there's the mappedSuperclass in use, NOT the class B!)

I'm not quite sure how this should be handled. At least, not specifying the relation in the mappedSuperclass but moving it to each of the yml-files of A and B solves this problem. (But unneccessarily complicates things?)

I will push a test case to my repo.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions