This commit is contained in:
Daniel 2025-08-10 11:54:31 +08:00
parent ac37d580f6
commit fcd44f41da
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 10 additions and 16 deletions

View file

@ -185,7 +185,7 @@ func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, rowID st
for _, blockID := range relVal.Relation.BlockIDs {
destVal := destAv.GetValue(key.Rollup.KeyID, blockID)
if nil == destVal {
if destAv.ExistBlock(blockID) { // 数据库中存在行但是列值不存在是数据未初始化,这里补一个默认值
if destAv.ExistBlock(blockID) { // 数据库中存在项目但是字段值不存在是数据未初始化,这里补一个默认值
destVal = GetAttributeViewDefaultValue(ast.NewNodeID(), key.Rollup.KeyID, blockID, destKey.Type)
}
if nil == destVal {

View file

@ -33,9 +33,9 @@ import (
type Value struct {
ID string `json:"id,omitempty"`
KeyID string `json:"keyID,omitempty"`
BlockID string `json:"blockID,omitempty"`
Type KeyType `json:"type,omitempty"`
KeyID string `json:"keyID,omitempty"` // 字段 ID
BlockID string `json:"blockID,omitempty"` // 项目 ID
Type KeyType `json:"type,omitempty"` // 字段类型
IsDetached bool `json:"isDetached,omitempty"` // 是否为非绑定块注意这个字段只能在主键KeyTypeBlock上使用其他类型的值不要使用
CreatedAt int64 `json:"createdAt,omitempty"`