Skip to content

Update with Join not support on query builder? #8542

Open

Description

@6unpk

Feature Description

join on update query

The Problem

It seems typeorm has no join feature. So, i checked UpdateQueryBuilder.ts and there are no join method. Is there are any reason for not exisiting join feature on update query builder? For some databases, they supports join feature on update.

The Solution

hope it works on query builder

this.repository.creatQueryBuilder()
.update()
.join()
.where();

Relevant Database Driver(s)

DB Type Relevant
aurora-data-api no
aurora-data-api-pg no
better-sqlite3 no
cockroachdb no
cordova no
expo no
mongodb no
mysql yes
nativescript no
oracle yes
postgres yes
react-native no
sap no
sqlite no
sqlite-abstract no
sqljs no
sqlserver no

Are you willing to resolve this issue by submitting a Pull Request?

  • ✅ Yes, I have the time, and I know how to start.
  • ✖️ Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✖️ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.

Activity

  1. Ginden commented on Jan 19, 2022

    @Ginden
    Contributor

    Related issue: #8538

    Interfaces should be similar.

    If CTEs got merged, only from(alias, whereClause) without joins would be necessary (though, joins would be still nice).

    SQLite allows UPDATE FROM too: https://www.sqlite.org/lang_update.html

  2. MohammadHoseinS commented on Aug 12, 2025

    @MohammadHoseinS

    Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions