Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create typeorm entity for postgresql MATERIALIZED VIEW

I have an existing MATERIALIZED VIEW in my postgresql database. I am trying to create typeorm entity for that. Can anyone tell me how to do that. I already went through typeorm View Entities docs but it's not useful as I expected.

like image 832
Jai Prak Avatar asked Aug 30 '19 10:08

Jai Prak


2 Answers

The support was added in this PR, and as mentioned in this answer it was resolved by using { materialized:true } along with ViewEntity, it may be a good idea to provide a clear example in the future.

like image 172
Lafi Avatar answered Nov 11 '22 20:11

Lafi


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/3996

like image 38
Ninth Autumn Avatar answered Nov 11 '22 21:11

Ninth Autumn