Skip to content
New issue

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

Automatically generate Entity repositories #81

Closed
seanjparker opened this issue Oct 26, 2020 · 0 comments · Fixed by #82
Closed

Automatically generate Entity repositories #81

seanjparker opened this issue Oct 26, 2020 · 0 comments · Fixed by #82
Assignees

Comments

@seanjparker
Copy link
Collaborator

When adding new entities you also need to create a new Repository class which extends the TransactionalRepository. All of the classes are pretty much the same:

@provide(ApplicantRepository)
export class ApplicantRepository extends TransactionRepository<Applicant> {
	public getRepository(): Repository<Applicant> {
		return super.manager.getRepository(Applicant);
	}
}

It would be much nicer to have a uniform way of representing the typeorm repositories.

Note: We need the shim to extend TransactionRepository since #68.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant