ent
ent copied to clipboard
Duplicate Method Error for "value" Field Name in Generated Ent Files
Description:
When utilizing Ent ORM and defining a field named "value" within my schema, an issue arises where the generated Ent files produce a duplicate method error. Specifically, the GetValue method is being generated in two separate files, resulting in a conflict.
- [ ] The issue is present in the latest release.
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
The GetValue method is duplicated across separate files within the generated Ent codebase, leading to a conflict.
Expected Behavior 🤔
The Ent code generation process should not result in duplicate method creation, especially when defining a field named "value."
Steps to Reproduce 🕹
Steps:
- Define an Ent schema with a field named "value".
- Generate Ent files using the defined schema.
- Review the generated code to observe the duplicate GetValue method across different files.
Your Environment 🌎
| Tech | Version |
|---|---|
| Go | 1.21.1 |
| Ent | 0.12.3 |
| Database | Postgresql |
| Driver | https://pkg.go.dev/database/sql/driver |
Which files is the GetValue method generated in?