Using andOn inside innerJoinTableOnFunction not translated column according to definition
See original GitHub issueIssue type:
[X ] Question [ X] Bug report [ ] Feature request [ ] Documentation issue
Database system/driver:
[X ] Postgres [ ] MSSQL [ ] MySQL [ ] MariaDB [ ] SQLite3 [ ] Oracle [ ] Amazon Redshift
typed-knex version:
[ X] latest
[ ] @next
[ ] 0.x.x
(or put your version here)
Knex.js version: 0.95.12
Query:
.innerJoinTableOnFunction("sector", RecordTable, (join) => {
join.andOnVal("group", "=", "MASTER_DATA")
.andOnVal("key", "=", "SECTOR")
.andOn("subKey", "=", "budget.sector");
})
Table Definition:
@Table("records")
export class RecordTable {
@Column({ primary: true, name: "id" })
public id!: string;
@Column({ name: "group" })
public group!: string;
@Column({ name: "key" })
public key!: string;
@Column({ name: "sub_key" })
public subKey!: string;
@Column({ name: "data" })
public data!: string;
}
The subKey
column is suppose to translate into "sector"."sub_key"
Now is generating something like this
INNER JOIN "records" AS "sector" ON "sector"."group" = $1
AND "sector"."key" = $2
AND "budget"."sector" = "sector"."subKey"
Postgres error hint:
hint: 'Perhaps you meant to reference the column "sector.sub_key".',
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Andon: How the System Works with Examples | SafetyCulture
Andon is a visual management system used by operators and managers in lean manufacturing to easily determine and display the status of ...
Read more >A Guide to Andon in Lean Manufacturing | Lucidchart Blog
What is Andon? The Jikoda methodology empowers operators to make decisions in manufacturing without having to wait for managerial approval. The Andon system ......
Read more >How to use a Andon – and how not to | AllAboutLean.com
In my previous post I described how the mechanical side of an andon works. In this post I tell you how the workers...
Read more >What is Andon in Lean Manufacturing? - Planview
This means giving operators not only the permission, but the obligation to stop the line when issues arise. Employees, especially in manufacturing, are...
Read more >Ultimate Guide to Andon Systems - Shop Floor IQ
A component of Lean Manufacturing, an Andon system is a communication scheme used to signal workers in manufacturing that there is a problem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Something went wrong when publishing. v4.5.1 should work
Hi @wwwouter,
I follow your instruction and my code work without any modification! It turn out my local
typed-knex
is not being updated even the version is already the latest. I’m not sure if the issue is withlerna
ornpm
.Thanks again for your assistance! I really enjoy working with
typed-knex
!