The entity does not work - what is the problem?
@Entity('banks')
export class Banks {
[key: string]: BanksStructure;
constructor(banks?: Partial<Banks>) {
Object.assign(this, banks);
}
}
I get this error:
ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
MissingPrimaryColumnError: Entity "Banks" does not have a primary column. Primary column is required to have in all your entities. Use @PrimaryColumn decorator to add a primary column to your entity.
As the error states your entity does not have a primary column. Please refer to the documentation for specifying it: https://typeorm.io/entities#primary-columns.