mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3855: Inheritance JOINED, left select child entity retrieves not valid object #4723
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 30, 2015).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user mplaton:
Delivery is child of inheritance parent Place. If delivery not set in query, result will have array of PlaceAddress entities, because PlaceAddress is a root alias, but when delivery added to select, then result will contain array of PlaceTypeDelivery but root alias stays PlaceAddress. Is this a bug?
$this->_em
->createQueryBuilder()
->select(['partial addresses.{id,realAddress,phone}','place','partial workday.{id}','partial delivery.{id}'])
->from('CommonBundle:PlaceAddress', 'addresses')
->leftJoin("addresses.place", "place", "WITH", "addresses.place = place.id")
->leftJoin("addresses.workday", "workday", "WITH", "workday.address = addresses.id")
->where("place INSTANCE OF CommonBundle:PlaceTypeDelivery")
->andWhere("place.enabled = 1");