hunk.code_window: import {createConnection} from "../../../src/index";
   import rimraf from "rimraf";
   import {dirname} from "path";
   import {Connection} from "../../../src/connection/Connection";
   describe("github issues > #799 sqlite: 'database' path should be created", () => {
       let connection: Connection;
       const path = `${__dirname}/tmp/sqlitedb.db`;
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit: import {getTypeOrmConfig} from "../../utils/test-utils";
  
hunk.file_path: test/github-issues/799/issue-799.ts
hunk.type: add
file: import "reflect-metadata";
  import {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
  import {Connection} from "../../../src/connection/Connection";
  import {expect} from "chai";
  import {User} from "./entity/User";
  
  // TODO: wrong test
  describe.skip("github issues > #2147 Lazy load JoinColumn with multiple columns name property is ignored for second reference column", () => {
  
      let connections: Connection[];
      before(async () => connections = await createTestingConnections({
           entities: [__dirname + "/entity/*{.js,.ts}"],
           schemaCreate: true,
           dropSchema: true,
      }));
      beforeEach(() => reloadTestingDatabases(connections));
      after(() => closeTestingConnections(connections));
  
      it("should create multiple column join for lazy loading relationship", () => {
          return Promise.all(connections.map(async connection => {
              // tests go here
              const username = "user name";
              const user = new User();
              user.key = 10;
              user.clientId = 16;
              user.name = username;
              user.updatedById = 10;
              await connection.manager.save(user);
  
              const users = await connection.manager.find(User);
  
              const updatedBy = await users[0].updatedBy;
  
              return expect(updatedBy.name).to.be.equal(username);
  
          }));
      });
  });
  