We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import {Injectable} from "@tsed/di"; import {DataSource} from "typeorm"; import {MySqlDataSource} from "../datasources/MySqlDataSource"; import {User} from "../entities/User"; export const UserRepository = MySqlDataSource.getRepository(User).extends({ findByName(firstName: string, lastName: string) { return this.createQueryBuilder("user") .where("user.firstName = :firstName", {firstName}) .andWhere("user.lastName = :lastName", {lastName}) .getMany(); } }); export const USER_REPOSITORY = Symbol.for("UserRepository"); export type USER_REPOSITORY = typeof UserRepository; registerProvider({ provide: USER_REPOSITORY, useValue: UserRepository });
export const UserRepository = MySqlDataSource.getRepository(User).extends({
Typo: extends -> extend
The text was updated successfully, but these errors were encountered:
If you appreciated the support, know that it is free and is carried out on personal time ;)
A support, even a little bit makes a difference for me and continues to bring you answers!
Sorry, something went wrong.
🎉 This issue has been resolved in version 7.31.0-rc.1 🎉
The release is available on:
v7.31.0-rc.1
Your semantic-release bot 📦🚀
🎉 This issue has been resolved in version 7.30.1 🎉
v7.30.1
Successfully merging a pull request may close this issue.
Create an injectable repository
export const UserRepository = MySqlDataSource.getRepository(User).extends({
Typo: extends -> extend
The text was updated successfully, but these errors were encountered: