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

Fix compile error caused by entc template when Entity name has initials TX #2633

Merged
merged 1 commit into from Jun 9, 2022

Conversation

hax10
Copy link
Contributor

@hax10 hax10 commented Jun 9, 2022

When creating an Entity with initials "TX", e.g. TumorXrays,

the code generated by entc cannot compile, because of a name clash in the generated transaction (tx) Unwrap() function:

func (tx *TumorXrays) Unwrap() *TumorXrays {
	tx, ok := tx.config.driver.(*txDriver)
	...

@hax10 hax10 changed the title Fix name clash in entc template when Entity name has initials TX Fix compile error caused by entc template when Entity name has initials TX Jun 9, 2022
@a8m a8m merged commit e615285 into ent:master Jun 9, 2022
@a8m
Copy link
Member

a8m commented Jun 9, 2022

Thanks for the contribution @hax10 🙏

@a8m
Copy link
Member

a8m commented Jun 9, 2022

@all-contributors please add @hax10 for code

@allcontributors
Copy link
Contributor

@a8m

I've put up a pull request to add @hax10! 🎉

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

Successfully merging this pull request may close these issues.

None yet

2 participants