简体   繁体   English

如何为 postgresql MATERIALIZED VIEW 创建 typeorm 实体

[英]How to create typeorm entity for postgresql MATERIALIZED VIEW

I have an existing MATERIALIZED VIEW in my postgresql database.我的 postgresql 数据库中有一个现有的MATERIALIZED VIEW I am trying to create typeorm entity for that.我正在尝试为此创建 typeorm 实体。 Can anyone tell me how to do that.谁能告诉我怎么做。 I already went through typeorm View Entities docs but it's not useful as I expected.我已经浏览了typeorm View Entities 文档,但它没有我预期的那样有用。

在这个PR中添加了支持,正如在这个答案中提到的,它是通过使用{ materialized:true }ViewEntity来解决的,在未来提供一个清晰的例子可能是一个好主意。

as of currently it is not possible to do so截至目前,这是不可能的

here are issues thread这是问题线程

https://github.com/typeorm/typeorm/issues/4317 https://github.com/typeorm/typeorm/issues/4317

https://github.com/typeorm/typeorm/issues/3996 https://github.com/typeorm/typeorm/issues/3996

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM