knox 已修改 . 還原成這個修訂版本
1 file changed, 8 insertions
TypeORM-readme-36.ts(檔案已創建)
@@ -0,0 +1,8 @@ | |||
1 | + | import { Photo } from "./entity/Photo" | |
2 | + | import { PhotoMetadata } from "./entity/PhotoMetadata" | |
3 | + | import { AppDataSource } from "./index" | |
4 | + | ||
5 | + | const photos = await AppDataSource.getRepository(Photo) | |
6 | + | .createQueryBuilder("photo") | |
7 | + | .innerJoinAndSelect("photo.metadata", "metadata") | |
8 | + | .getMany() |
上一頁
下一頁