Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doctrine 2 - Generate entities with views from database

Is it possible to generate a view from database with Doctrine 2?

I explain:

My db contains some views I want use, but I don't know how generate these views.

In my case, I have two tables and one view, the view selects a few columns in each table and I just want THIS view in the folder "Entity" of the project.

like image 604
user2839159 Avatar asked Oct 21 '13 15:10

user2839159


1 Answers

Database views are not currently supported by Doctrine 2, but it can potentially perform very badly. Try it yourself mapping the view as an entity and mark it as a @readOnly entity.

like image 179
manix Avatar answered Sep 18 '22 15:09

manix