question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add View entity relations support.

See original GitHub issue

Issue type:

[ ] question [ ] bug report [x] feature request [ ] documentation issue

Database system/driver:

[ ] cordova [ ] mongodb [ ] mssql [x] mysql / mariadb [ ] oracle [ ] postgres [ ] cockroachdb [ ] sqlite [ ] sqljs [ ] react-native [ ] expo

TypeORM version:

[ ] latest [ ] @next [x] 0.2.18

I would like to add view entity relation support. It would be very useful to be able to join a view relation just like an entity. In the end, views works the same way as normal tables at a database level, and I think it should be the same at entity or view entity level.

The problem is that the only way to make this work actually is disabling synchronize so typeorm don’t tries to add foreign keys for view entity relations. The thing is that if you disable synchronize it works perfectly, so I just need synchronization to ignore certain relations.

What I’m asking for is to add support to disable specific relation foreign key creation just as #3124 or #3120 does. Or even add entire view entity relation support, in a way relations modeled at view entites are kind of “virtual”, just metadata, so you can use it in query builder and other libraries that are built for typeorm.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:23
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
romchambecommented, Aug 20, 2021

It would be very helpful for us as well 👍

2reactions
wi-skicommented, Jan 21, 2021

Is there a reason driver: postgres is not added to this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

View Entities - typeorm - GitBook
View entity is a class that maps to a database view. You can create a view entity by defining a new class and...
Read more >
Entity Relationships - Entity Framework Tutorial
Here, you will learn how entity framework manages the relationships between entities. Entity framework supports three types of relationships, ...
Read more >
Add generic Views entity tables with fields and relationships
Create field handlers (based on ones from Views probably) for all data types supported by the Entity API, and a special one for...
Read more >
Manage Relations as Cards and Lanes on Views
To create a relation with an existing entity displayed on the same board, you can right-click on card and select 'Add relation...' option...
Read more >
Relationships - EF Core | Microsoft Learn
A relationship defines how two entities relate to each other. In a relational database, this is represented by a foreign key constraint.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found