mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1824: Native Query fail #2298
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 (May 17, 2012).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user mowee:
I keep getting an error while I'm trying to perfom an native query.
If there is no result then everything is fine and I don't get any errors.
Notice: Undefined index: id in C:\xampp\htdocs\Symfony\vendor\doctrine\lib\Doctrine\ORM\UnitOfWork.php line 1949
@doctrinebot commented on GitHub (May 17, 2012):
Comment created by @beberlei:
You have to add the id as field aswell using $rsm->addFieldResult()
@doctrinebot commented on GitHub (May 17, 2012):
Comment created by mowee:
It doesn't matter if I use the id as well. I keep getting the same error message:
@doctrinebot commented on GitHub (May 20, 2012):
Comment created by mowee:
It doesn't matter if I use the id as well. I keep getting the same error message.
@doctrinebot commented on GitHub (May 27, 2012):
Comment created by @beberlei:
Do you want to fetch the whole Question Entity? Or just the question as string? Since you only do q.question i suppose using a scalar result instead of the entity works.
However if you want the whole entity, then you have to fetch the ID from sql as well:
@doctrinebot commented on GitHub (May 27, 2012):
Issue was closed with resolution "Invalid"
@doctrinebot commented on GitHub (May 27, 2012):
Comment created by mowee:
Now it works perfectly fine. Thank you :)