You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, MyBatis Dynamic SQL generates SqlColumn fields that represent database columns but do not directly bind or link to entity property names. This causes a lot of duplication and boilerplate code, such as having to maintain separate mappings for database column names and entity field names (e.g., toProperty mappings) manually or via additional configurations.
I’d like to suggest adding support for a unified Column (or enhanced SqlColumn) type that simultaneously holds:
the database column name,
the JDBC type,
and the corresponding entity property name.
This would simplify code generation and improve type-safety, reduce redundancy, and help maintain consistency between SQL building and entity mapping. The generated code would be cleaner, easier to maintain, and less error-prone.
Would you consider adding such a feature or making the code generation support this pattern in a future release?