Symfony2,Doctrine2,MySql,查看表 [英] Symfony2, Doctrine2, MySql, view tables
问题描述
简单的问题是,是否支持doctrine2中的视图表?我发现它可以'读'当前的模式 http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/schema-manager.html 但是它能创建新的视图表,如其他实体? / p>
它可以解决很多问题。
在mapper中定义视图我认为你不能这样做
如果你只想使用视图来读取数据,我想你可以这样做。只需在mapper中定义视图字段,就像一般表
Simple question, is there support for view-tables in doctrine2? I found that it can 'read' current schema http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/schema-manager.html But can it create new view-tables like others entity\tables ?
It can solve a lot of issues.
if you want to define views in mappers I think you can't do this If you want simply use views to read data from them I think you can do it. Simply define views fields in mapper as for general tables
这篇关于Symfony2,Doctrine2,MySql,查看表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!