mirror of
https://github.com/typeorm/typeorm.git
synced 2025-12-08 21:26:23 +00:00
docs: changed getManager to getRepository (#5099)
`getRepository` is imported instead of `getManager`.
This commit is contained in:
parent
c87e4e7ad9
commit
b141a91f66
@ -21,7 +21,7 @@ await getConnection()
|
||||
This code is equivalent to doing this:
|
||||
|
||||
```typescript
|
||||
import {getManager} from "typeorm";
|
||||
import {getRepository} from "typeorm";
|
||||
|
||||
const postRepository = getRepository(Post);
|
||||
const post = await postRepository.findOne(1, { relations: ["categories"] });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user