Consider a base entity as below:
export abstract class Notification {
@PrimaryGeneratedColumn()
id: number;
@Column({type: "date",nullable: false})
seenAt: Date;
@Column({ type: "integer", nullable: false })
priority: number;
}
and two child entities as below:
@Entity()
export class NotificationType1 extends Notification {}
and
@Entity()
export class NotificationType2 extends Notification {}
Is there a way to find all rows in NotificationType1 and NotificationType2 using a query to the parent class like this?
SELECT * FROM NOTIFICATION;
This query return 0 rows, although there are records in NotificationType1 and NotificationType2 tables.