Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top