I am currently working on querying an entity with a date column in order to find the entity with the earliest created date. Can someone guide me on how I can achieve this using TypeORM?
Here is what I have tried so far:
const earliest_result = await getRepository(Verification).findOne({ where: {
created_date: // Need to find the earliest date
}});
This is how my model is structured:
export class Verification {
@Column({ nullable: false })
success!: boolean
@CreateDateColumn()
created_date!: Date
};