-
-
Notifications
You must be signed in to change notification settings - Fork 611
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Hi! thanks a bunch for this awesome ORM!
Describe the bug
I'm trying to join the same table twice (this is a simplified example)
const qb = await this.patternRepository
.createQueryBuilder('patterns')
.select(['patterns.id', 'user.id', 'user2.id'])
.leftJoin('patterns.user', 'user')
.leftJoin('patterns.user', 'user2')
.getResultList();
and getting an error
invalid reference to FROM-clause entry for table "user"
this is the resulted sql query, seems like one left join is missing
select "patterns"."id", "user"."id", "user2"."id" from "pattern" as "patterns" left join "user" as "user2" on "patterns"."userId" = "user2"."id"
Expected behavior
No error
Versions
| Dependency | Version |
|---|---|
| node | 14 |
| typescript | 4.1.3 |
| mikro-orm | 5 |
| your-driver | postgresql |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working