Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Add Relation column to database table view https://github.com/siyuan-note/siyuan/issues/9888

Daniel8681bf725e68
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 1636454bd3..344158489d 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -2173,7 +2173,9 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
oldBoundBlockID := val.BlockID
var oldRelationBlockIDs []string
if av.KeyTypeRelation == val.Type {
- oldRelationBlockIDs = val.Relation.BlockIDs
+ for _, bID := range val.Relation.BlockIDs {
+ oldRelationBlockIDs = append(oldRelationBlockIDs, bID)
+ }
}
data, err := gulu.JSON.MarshalJSON(valueData)
if nil != err {