Вопрос

Is there a simple way of doing this in doctrine, or am I going to have to do a native sql query? If someone could point me in the right direction, it would be appreciated.

Это было полезно?

Решение

Quick answer is, no. There is not a "simple way" of doing this.

You need to use Doctrine Native SQL which can be found here. This will allow you to map the results into usable entities like you're used to while using database specific things.

You could also use a DQL user defined function, described here. This is probably the "correct" way.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top