Zuletzt aktiv 1729145419

TypeORM-readme-27.ts Orginalformat
1import { Photo } from "./entity/Photo"
2import { AppDataSource } from "./index"
3
4const photoRepository = AppDataSource.getRepository(Photo)
5const photoToRemove = await photoRepository.findOneBy({
6 id: 1,
7})
8await photoRepository.remove(photoToRemove)