Skip to content

Left joins results in invalid SQL #1230

@VojtaStanek

Description

@VojtaStanek

When I do call .find with join option: { alias: 'root', leftJoinAndSelect: { orders__0: 'root.orders', items__1: 'orders__0.items' } } it results in this (invalid) SQL - note the nothing between ON and WHERE:

SELECT "root"."id" AS "root_id", [...] LEFT JOIN "order" "orders__0" ON "orders__0"."userId"="root"."id"  LEFT JOIN "order_item" "items__1" ON  WHERE "root"."id"=$1

Posgres + typeorm 0.1.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions