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

模型声明关于嵌套字段权限功能完善 #7399

Open
RoseEnd opened this issue Mar 26, 2025 · 0 comments
Open

模型声明关于嵌套字段权限功能完善 #7399

RoseEnd opened this issue Mar 26, 2025 · 0 comments
Assignees
Labels
type:feature_request feature request

Comments

@RoseEnd
Copy link

RoseEnd commented Mar 26, 2025

Describe the feature

关于嵌套模型的gorm tag目前不支持如下写法

type PurItemCommon {
  OrderID int64
}

type PurReceiveItem struct {
	BaseDelete
	PurItemCommon `gorm:"->"`
}

只支持

type PurReceiveItem struct {
	BaseDelete
	PurItemCommon `gorm:"-"`
}

某些时候我们不希望PurItemCommon在create的时候插入数据库,但是查询时可以连表查询并映射到此嵌入结构体
希望能和非嵌入字段权限一样使用

Motivation

Related Issues

@github-actions github-actions bot added the type:feature_request feature request label Mar 26, 2025
@RoseEnd RoseEnd changed the title 模型声明关于嵌套字段的建议 模型声明关于嵌套字段权限功能完善 Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature_request feature request
Projects
None yet
Development

No branches or pull requests

2 participants