E
E
e-hot2019-05-28 17:23:24
symfony
e-hot, 2019-05-28 17:23:24

Why in Symphony 2 Doctrine when querying via createQueryBuilder or createQuery with getResult or getArrayResult returns only one database record?

Welcome all.
Need help with the following situation.
Situation:
I had to go back to an old Symphony 2.4 project. There is a problem: when searching the database through different forms of queries - createQueryBuilder or createQuery and assembling them in getResult or getArrayResult for some reason only one (first) record from the database is issued, although more than one record is stated in the database by an sql query.
Question:
Has anyone else experienced this issue and how can I fix it? I also tried to use getScalarResult - here it gives out the necessary objects, but packs them into different arrays, in the number of conjugated objects of other tables connected through mapping. The trick is that similar createQuery queries are used in the project, for example, for
getting ALL records of a table or with multiple parameters - everything works fine.
Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question