Skip to content

Commit

Permalink
fix: embedded fields
Browse files Browse the repository at this point in the history
  • Loading branch information
qqxhb authored and tr1v3r committed Mar 3, 2025
1 parent a4e20d9 commit 1e1def8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/generate/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func (b *QueryStructMeta) parseStruct(st interface{}) error {
CustomGenType: fp.GetFieldGenType(f),
ColumnComment: f.Comment,
}
if len(f.EmbeddedBindNames) > 1 {
gf.Name = strings.Join(f.EmbeddedBindNames, "")
}
if gf.ColumnComment == "" {
gf.ColumnComment = f.TagSettings["COMMENT"]
}
Expand Down

0 comments on commit 1e1def8

Please sign in to comment.