MikroORM creates business_biz_reg_no instead of using your biz_reg_no column for the join. You defined both biz_reg_no (a string) and a @ManyToOne() relation without telling MikroORM to reuse the same column.
@ManyToOne(() => BusinessEntity, {
referenceColumnName: 'biz_reg_no',
fieldName: 'biz_reg_no', //<= use this to force MikroORM to use the right column
nullable: true,
})
business?: BusinessEntity;
Also fix this (array not single):
@OneToMany(() => InquiryEntity, (inquiry) => inquiry.business)
inquiries: InquiryEntity[]; // <= not `inquiry`
Now MikroORM will generate:
ON i.biz_reg_no = b.biz_reg_no