Skip to content

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

@RoseEnd

Description

@RoseEnd

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions