Skip to content

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

:art: Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964

Daniel05e495406da3
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 56bf2f7a83..2d326bb3af 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -3986,7 +3986,11 @@ func updateAttributeViewColumn(operation *Operation) (err error) {
if changeType {
for _, view := range attrView.Views {
- removeAttributeViewGroup0(view)
+ if nil != view.Group {
+ if groupKey := view.GetGroupKey(attrView); nil != groupKey && groupKey.ID == operation.ID {
+ removeAttributeViewGroup0(view)
+ }
+ }
}
}
@@ -4111,7 +4115,11 @@ func RemoveAttributeViewKey(avID, keyID string, removeRelationDest bool) (err er
}
for _, view := range attrView.Views {
- removeAttributeViewGroup0(view)
+ if nil != view.Group {
+ if groupKey := view.GetGroupKey(attrView); nil != groupKey && groupKey.ID == keyID {
+ removeAttributeViewGroup0(view)
+ }
+ }
}
err = av.SaveAttributeView(attrView)