I'm using Typeorm JavaScript not Typescript for PostgreSQL in Nodejs application. I have a two tables:
- Resource
- Passenger
In Resource Table I have
id and type
both are primary key and act as composite key.In Passenger Table I have
Driver_Id and Driver_Type
I'm trying to make Resource Id and Type as foreign key to Driver_Id and Driver_Type. But when I do with Typeorm its create a table column like Driver_IDResourceID and DriverTypeResourceType.
I have tried almost everything mentioned in the Typeorm docs but nothing work for JavaScript version.
Any help will be appreciated.