FG
๐Ÿ’ป Software๐Ÿ—„๏ธ Databases

Allow WHERE clause on joined columns.

Freshover 4 years ago
Mar 14, 20260 views
Confidence Score76%
76%

Problem

Issue type: [ ] question [ ] bug report [x ] feature request [ ] documentation issue Hi! As it said in the documentation of `FindManyOptions#where`: > Querying a column from an embedded entity should be done with respect to the hierarchy in which it was defined. It is possible to extend this capability to the joined columns ? For exemple with 2 entities: [code block] Make a request like this: [code block] SQL: [code block] I don't have seen any other options in TypeORM documentation to apply where clauses on joined columns. If there another way I am interested about it. Thank you in advance for your help.

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence100% success rate6 verificationsLast verified Mar 14, 2026

Solution: Allow WHERE clause on joined columns.

Low Risk

Thanks for your help @periman2. But my needed is to filter result with a deep where clause by the find (or findMany) method in a generic service (model agnostic) where conditions are given from HTTP query parameters. So, I don't have any doubt about your solution with the query builder, but if it's possible, I prefer a solution where I don't need to make an ORM over an ORM. XD I will remember y

74

Trust Score

6 verifications

100% success
  1. 1

    Thanks for your help @periman2.

    But my needed is to filter result with a deep where clause by the find (or findMany) method in a generic service (model agnostic) where conditions are given from HTTP query parameters.

  2. 2

    So, I don't have any doubt about your solution with the query builder, but if i

    So, I don't have any doubt about your solution with the query builder, but if it's possible, I prefer a solution where I don't need to make an ORM over an ORM. XD

  3. 3

    I will remember your proposition in last resort. But if there are a way to integ

    I will remember your proposition in last resort. But if there are a way to integrate this feature in TypeORM, it will be cool.

Validation

Resolved in typeorm/typeorm GitHub issue #2707. Community reactions: 22 upvotes.

Verification Summary

Worked: 6
Partial: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

typeormormtypescriptnew-featurecomp:-query-buildercomp:-find-options