doctrine / orm

Doctrine Object Relational Mapper (ORM)
https://www.doctrine-project.org/projects/orm.html
MIT License
9.93k stars 2.52k forks source link

DDC-826: Problem with @MappedSuperclass and associations #5345

Closed doctrinebot closed 8 years ago

doctrinebot commented 14 years ago

Jira issue originally created by user mojito:

I have a project with global entities(Lib\Shared\Main - @MappedSuperclass ) and local entities(Shared\Main) which extends the globals.

The following DQL is returning wrong SQL:

SELECT Horoscope FROM Shared\Main\Horoscope Horoscope JOIN Horoscope.sign Sign WHERE Sign.id = 7

SELECT h0.id AS id0, h0.date AS date1, h0.contents AS contents2, h0.signId AS signId3 FROM horoscopes h0_ INNER JOIN global.sys_zodiacsigns g1 ON h2.signId = g1.id WHERE g1_.id = 7

The attached zip contains the entity files.

What is the correct way to extends entities and to build JOINed requests

Have a nice day

doctrinebot commented 14 years ago
doctrinebot commented 14 years ago

Comment created by @beberlei:

Beta2? Please update to Beta4

Are you using YAML Driver? If yes this is a known bug that was fixed in trunk lately and will be included as a fix for RC1.

doctrinebot commented 14 years ago

Comment created by mojito:

I'm using annotations and Beta4 is not working better for my problem.

doctrinebot commented 14 years ago

Comment created by mojito:

is there a good example of using Class Table Inheritance and Mapped Superclasses

doctrinebot commented 14 years ago

Comment created by @beberlei:

I cant reproduce it, i am pretty sure this is a duplicate of DDC-671

doctrinebot commented 14 years ago

Issue was closed with resolution "Duplicate"