最后活跃于 1729143735

knox 修订了这个 Gist 1729143735. 跳至此修订

1 file changed, 16 insertions

TypeORM-readme-4.ts(file created)

@@ -0,0 +1,16 @@
1 + const user = new User()
2 + user.firstName = "Timber"
3 + user.lastName = "Saw"
4 + user.age = 25
5 + await user.save()
6 +
7 + const allUsers = await User.find()
8 + const firstUser = await User.findOneBy({
9 + id: 1,
10 + })
11 + const timber = await User.findOneBy({
12 + firstName: "Timber",
13 + lastName: "Saw"
14 + })
15 +
16 + await timber.remove()
更新 更早