G
G
grabbee2021-08-24 10:50:17
Doctrine ORM
grabbee, 2021-08-24 10:50:17

How to get an extra field along with the rest?

I'm trying to get a list of all elements and add to them a property of type COUNT (...) AS counter calculated in the database, and as a result it makes an array of nested values

[
  [
    [...данные из таблицы..],
    [counter: число]
  ]
]

And I want it to just add a value to the list of data. How to do it?
->addSelect('count(p.point) AS count')

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