title: TypeORM get one side of a many to many relationship
body: <p>I have got two entities: <code>User</code> and <code>Organisation</code>. These entities have a Many-to-Many relationship with each other. (A user can belong to multiple organisations and an organisation has multiple users.)</p>
  
  <p>I have an endpoint <code>/organisation/:id/members</code> this endpoint should return only the users belonging to the organisation of <code>:id</code>.</p>
  
  <p>I have created a query as follows:</p>
  
  <pre><code>    const members = await getConnection()
        .createQueryBuilder(Organisation, 'org')
        .where('org.id = :orgId', { orgId })
        .innerJoinAndSelect('org.members', 'member')
        .select('member')
        .getMany();
  </code></pre>
  
  <p>This returns an empty array, except when <code>getRawMany</code> is used. Then it returns the following:</p>
  
  <pre><code>[
    {
      "member_id": 1,
      "member_email": "example@example.com",
      "member_firstName": "John",
      "member_middleName": "",
      "member_lastName": "Doe"
    }
  ]
  </code></pre>
  
  <p>I would like to know how I get <code>getMany()</code> to return <code>User</code> entities.</p>
  
  <p><strong>Update:</strong>
  I have the following example which does work. However, it requires the user to give the joinTable a name.</p>
  
  <pre><code>await getConnection()
        .createQueryBuilder(User, 'user')
        .innerJoinAndSelect(
          'organisation_members',
          'member',
          'member.userId = user.id',
        )
        .where('member.organisationId = :orgId', { orgId })
        .getMany();
  </code></pre>