Misc changes

| Q             | A
| ------------- | ---
| Doc fix?      | yes
| New docs?     | no
| Applies to    | 2.3
| Fixed tickets | 


@xelaris suggested in #4701 to use `getRepository()` directly instead of calling `getManager()` first. Can you change that too?