Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top