From e6601b6cd84f2cd6e77eb9e33cae39bfd69c9c53 Mon Sep 17 00:00:00 2001 From: einhornimmond Date: Fri, 25 Aug 2023 17:13:16 +0200 Subject: [PATCH] remove unneccessary relation --- dlt-database/entity/0001-init_db/Account.ts | 6 ------ dlt-database/entity/0001-init_db/Community.ts | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dlt-database/entity/0001-init_db/Account.ts b/dlt-database/entity/0001-init_db/Account.ts index 2d2882704..ae7e8c8ec 100644 --- a/dlt-database/entity/0001-init_db/Account.ts +++ b/dlt-database/entity/0001-init_db/Account.ts @@ -61,12 +61,6 @@ export class Account { @Column({ name: 'balance_date', type: 'datetime' }) balanceDate: Date - @OneToOne(() => Community, (community) => community.gmwAccount) - gmwCommunity?: Community - - @OneToOne(() => Community, (community) => community.aufAccount) - aufCommunity?: Community - @ManyToMany(() => Community, (community) => community.communityAccounts) @JoinTable({ name: 'accounts_communities', diff --git a/dlt-database/entity/0001-init_db/Community.ts b/dlt-database/entity/0001-init_db/Community.ts index 5b7de1d3c..a3c321113 100644 --- a/dlt-database/entity/0001-init_db/Community.ts +++ b/dlt-database/entity/0001-init_db/Community.ts @@ -35,14 +35,14 @@ export class Community { @Column({ name: 'gmw_account_id', type: 'int', unsigned: true, nullable: true }) gmwAccountId?: number - @OneToOne(() => Account, (account) => account.gmwCommunity) + @OneToOne(() => Account) @JoinColumn({ name: 'gmw_account_id' }) gmwAccount?: Account @Column({ name: 'auf_account_id', type: 'int', unsigned: true, nullable: true }) aufAccountId?: number - @OneToOne(() => Account, (account) => account.aufCommunity) + @OneToOne(() => Account) @JoinColumn({ name: 'auf_account_id' }) aufAccount?: Account