A
A
Alexander Strelov2012-11-15 12:10:10
PHP
Alexander Strelov, 2012-11-15 12:10:10

How to work with SQL VIEW in Doctrine?

I can't figure out how to use ready-made SQL VIEWs in Doctrine 2? The same goes for SQL procedures. Everything is already in the database and there is no need to generate it in Doctrine, you only need to use it to get data.

I ask you to tell me in which direction to dig, I only found the option of creating a view in the code , maybe there is a function to get the SQL code by the name of the view, or I don’t understand something fundamentally?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2012-11-15
Protko @Fesor

To work with procedures and views, I used NativeSQL. In order not to write your own table mapping, you can use the @EntityResult annotation. In general, you can think of many different ways, but I think there is not much point in this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question