title: TypeORM single table inheritance use abstract classes between @Entity() and @ChildEntity()
body: <p>I would like to achieve the following single table inheritance with TypeORM:</p>
  <pre><code>@Entity()
  @TableInheritance({column: {type: &quot;varchar&quot;, name: &quot;type&quot;}})
  export class BaseDevice {
  
    @PrimaryGeneratedColumn({type: &quot;uuid&quot;})
    id: string;
  
    // other fields
  }
  
  abstract class MeasureableDevice extends BaseDevice {
  
    @Column()
    value: string;
  
    // other fields
  }
  
  @ChildEntity()
  export class TemperatureSensor extends MeasureableDevice {
  
    @Column()
    position: string;
  
    // other fields
  }
  </code></pre>
  <p>But when I run my application, I get the following error:</p>
  <blockquote>
  <p>(node:2574710) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'build' of undefined
  at /node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js:526:83
  at Array.forEach ()
  at EntityMetadataBuilder.computeEntityMetadataStep2 (/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js:526:37)
  at /node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js:81:74
  at Array.forEach ()
  at EntityMetadataBuilder.build (/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js:81:25)
  at ConnectionMetadataBuilder.buildEntityMetadatas (/node_modules/typeorm/connection/ConnectionMetadataBuilder.js:57:141)
  at Connection.buildMetadatas (/node_modules/typeorm/connection/Connection.js:514:57)
  at Connection. (/node_modules/typeorm/connection/Connection.js:127:30)
  at step (/node_modules/tslib/tslib.js:141:27)
  (Use <code>node --trace-warnings ...</code> to show where the warning was created)
  (node:2574710) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag <code>--unhandled-rejections=strict</code> (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
  (node:2574710) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.</p>
  </blockquote>
  <p>When I remove the abstract class in between of <code>@Entity()</code> and <code>@ChildEntity()</code> classes and copy the <code>@Column()</code> fields of <code>abstract class MeasureableDevice</code> directly into <code>class TemperatureSensor</code> everything works. So it seems there is a problem with an abstract class in between those the annotated classes. Does anyone know how to solve this?</p>