How to set up entity (doctrine) for database view in Symfony 2

前端 未结 6 1373
心在旅途
心在旅途 2020-11-30 01:51

Lets say i have a view table. And i want to get data from it to an entity. Can i (and how) create entity class to do that. (no save operation needed). I just want to display

6条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-30 02:51

    In addition to above answer, You must have a naming Strategy of your view' entities and the virtual tables, for example: view_your_table, and then you must add the following code to the doctrine.yaml, to disable creating new migration file to the view: schema_filter: ~^(?!view_)~

提交回复
热议问题