Zuletzt aktiv 1729145384

Änderung bfc6dbce8771886399d50706cb12911345929e87

TypeORM-readme-26.ts Orginalformat
1import { Photo } from "./entity/Photo"
2import { AppDataSource } from "./index"
3
4const photoRepository = AppDataSource.getRepository(Photo)
5const photoToUpdate = await photoRepository.findOneBy({
6 id: 1,
7})
8photoToUpdate.name = "Me, my friends and polar bears"
9await photoRepository.save(photoToUpdate)