Skip to content

chriswheeldon-peakon/sequelize-v7-alias-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is intended as a minimal reproducible example for sequelize/sequelize#17091

Instructions

Firstly, copy .env.example to .env and set the variables to configure the postgres instance and database to connect to in index.js.

Secondly, install dependencies with npm i.

Then, npm run start to reproduce the bug.

An exception should be printed that shows the malformed select query n.b. that the table alias is prefixed with the schema, in this case "dev".

Executing (default): SELECT "relation"."id", "relation"."entityId", "entity"."id" AS "entity.id" FROM "dev"."relation" AS "relation" LEFT OUTER JOIN "dev"."entity" AS "entity" ON "dev"."relation"."entityId" = "entity"."id";

...

DatabaseError [SequelizeDatabaseError]: invalid reference to FROM-clause entry for table "relation"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published