title: Typeorm how to get relations of relations
body: <p>I am getting the Object ChatRoomEntity with <code>entitymanager.findOne</code> method. The ChatRoomEntity has the variable <code>messages</code> which is a OneToMany - ManyToOne Relation. I have no problems to select that but how do I get the user which sent the message. Its a variable on MessageEntity with a OneToMany Relation.</p>
  <p>So basically I want to select a room and all messages of it. But all messages should also have their values on <code>fromUser</code>.
  I select the room like this:</p>
  <pre><code>this.entityManager.findOne(ChatRoomEntity, {where: {id: roomToJoin.id}, relations: ['activeUsers', 'messages']}).then(roomEntity =&gt; {
  // some code
  }
  </code></pre>
  <p>Here my entities:</p>
  <p>UserEntity</p>
  <pre><code>
  @Entity()
  export class UserEntity {
    @PrimaryGeneratedColumn()
    id: number;
  
    @CreateDateColumn()
    registrationDate: Date;
  
    @ManyToMany(type =&gt; ChatRoomEntity, room =&gt; room.activeUsers, {cascade: true})
    @JoinTable()
    activeChatRooms: ChatRoomEntity[];
  
    @OneToMany(type =&gt; ChatRoomMessageEntity, msg =&gt; msg.fromUser)
    chatRoomMessages: ChatRoomMessageEntity[];
  }
  
  </code></pre>
  <p>ChatRoomEntity</p>
  <pre><code>@Entity()
  export class ChatRoomEntity {
    @PrimaryGeneratedColumn()
    id: number;
  
    @Column('varchar', {nullable: true})
    title: string;
  
    @OneToMany(type =&gt; ChatRoomMessageEntity, chatrmsg =&gt; chatrmsg.chatRoom)
    messages: ChatRoomMessageEntity[];
  
    @ManyToMany(type =&gt; UserEntity, user =&gt; user.activeChatRooms)
    activeUsers: UserEntity[];
  
  }
  </code></pre>
  <p>ChatRoomMessageEntity</p>
  <pre><code>@Entity()
  export class ChatRoomMessageEntity {
    @PrimaryGeneratedColumn()
    id: number;
  
    @Column('varchar', {nullable: true})
    message: string;
  
    @CreateDateColumn()
    creationDate: Date;
  
    @ManyToOne(type =&gt; UserEntity, user =&gt; user.chatRoomMessages)
    fromUser: UserEntity;
  
    @ManyToOne(type =&gt; ChatRoomEntity, chatRoom =&gt; chatRoom.messages)
    chatRoom: ChatRoomEntity;
  
  }
  </code></pre>