Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

163
Views
Typeorm global where clause

in my database, all tables have a boolean column "active" which is used to know if the row should be returned or not on the query.

As we use TypeORM as our back-end ORM, Is it possible to have a global statement/clause that is "concatenated" on every query made by TypeORM, like:

WHERE column.active = true

So, like this, the rows with the column active with 0 as a value, don't return on TypeORM queries during the main application flow, instead of rewriting it on every queryBuilder or repositories premade queries like "find" or "findOrfail" where we dont even write anything.

  • Need to be in TypeORM because it should be returned on manual queries on sgbd and things like this
  • We use postgre as SGBD
  • Typeorm v0.2.24
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!