I am working with three tables and entities:
- client
- store
- store_client
The relationships between these entities are as follows:
Client:
@OneToMany((type) => StoreClient, (storeClient) => storeClient.client, { eager: false })
storeClient: StoreClient[];
Store:
@OneToMany((type) => StoreClient, (storeClient) => storeClient.store, { eager: false })
storeClient: StoreClient[];
StoreClient:
@ManyToOne((type) => Client, (client) => client.storeClient, { eager: false })
client: Client;
@ManyToOne((type) => Store, (store) => store.storeClient, { eager: false })
store: Store;
However, I have encountered an issue when creating migrations and running them. The structure of the store_client table is correctly generated with columns for id, clientId, storeId, and Role.
The problem lies in the store and client tables where additional columns like storeClientId are created. Can anyone provide guidance on how to resolve this?
Thank you in advance for any assistance provided!