mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
addJoinedEntityResult does not seem to work with oneToMany/manyToOne #5799
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 @yurtesen on GitHub (Dec 10, 2017).
Originally assigned to: @yurtesen on GitHub.
I am using symfony 3.4.1, with doctrine/orm 2.5.13. I have 2 tables.
storeandstore_product.In
Storeentity I have:and in
Store\Productentity I have composite index with (store_id,product_id). I have:Earlier I produced a native query using the guide. It was only fetching entries from
storetable and it worked perfectly.Now I am trying to join
store_producttable and it is not going so well. I am using the following query which returns 1 result.SELECT st.id, st.name, stp.store_id, stp.product_id stp.price FROM store st LEFT JOIN store_product stp ON st.id = stp.store_id WHERE st.id=1 LIMIT 1;returns something like:
I setup the result set mapping as follows:
I am getting error:
Notice: Undefined index: storeCan anybody see the reason of the error?