Skip to content

Improve database unbind block #11013

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

Closed
3 tasks done
shuojie819 opened this issue Apr 13, 2024 · 7 comments
Closed
3 tasks done

Improve database unbind block #11013

shuojie819 opened this issue Apr 13, 2024 · 7 comments
Assignees
Milestone

Comments

@shuojie819
Copy link

shuojie819 commented Apr 13, 2024

数据库中不存在,显示已绑定

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

在数据库主键添加了一个块,莫名其妙的消失了,然后再添加就显示已绑定……(重启了思源、重建了索引,都不太行)
PixPin_2024-04-13_13-28-02
https://github.com/siyuan-note/siyuan/assets/72399630/c921e90a-c79a-4e1d-afb9-2cdb2e7ddc0a

Expected result

当块不存在数据库中时不应该显示已绑定

Screenshot or screen recording presentation

No response

Version environment

- Version: v3.0.10-dev1
- Operating System: windows 11 24H2
- Browser (if used):

Log file

More information

No response

@shuojie819 shuojie819 changed the title Please enter the title of the bug report 数据库中不存在,显示已绑定 Apr 13, 2024
@shuojie819
Copy link
Author

shuojie819 commented Apr 13, 2024

又试了一下,好像是数据库中取消绑定块后不删除改行,在添加那个引用的话就会报已绑定……

@TCOTC
Copy link
Contributor

TCOTC commented Apr 13, 2024

确实是,即使删掉原来那个主键里的文本也不行

@88250
Copy link
Member

88250 commented Apr 14, 2024

好像没有问题,只是不应该提示?稍后修改一下这种情况下不再提示已绑定。

88250 added a commit that referenced this issue Apr 14, 2024

Unverified

This user has not yet uploaded their public signing key.
@88250 88250 closed this as completed Apr 14, 2024
@TCOTC
Copy link
Contributor

TCOTC commented Apr 14, 2024

好像没有问题,只是不应该提示?稍后修改一下这种情况下不再提示已绑定。

不只是提示的问题。只要取消绑定块后不删除之前绑定该块的条目(或者让条目绑定别的块),就无法在数据库中再次绑定这个块

@88250
Copy link
Member

88250 commented Apr 14, 2024

好像没有问题,只是不应该提示?稍后修改一下这种情况下不再提示已绑定。

不只是提示的问题。只要取消绑定块后不删除之前绑定该块的条目(或者让条目绑定别的块),就无法在数据库中再次绑定这个块

我这里测试可以绑定的,拖进去就行了。

@TCOTC
Copy link
Contributor

TCOTC commented Apr 14, 2024

我这里的行为完全不对啊,怎样都只能绑定原来的条目,不能新增条目、也不能绑定其他条目:

取消绑定了,但没完全取消绑定

数据库

88250 added a commit that referenced this issue Apr 14, 2024
* 🎨 add database lineNumber type

* 🎨 fix #10896

* 🎨 Improve mobile app appearance language #11009

* 🎨 Improve database template field calc #11011

* ⬆️ Upgrade kernel deps

* ⬆️ Upgrade kernel deps

* 🎨 fix #10896

* 🎨 fix #10896

* 🐛 #11015

* 🐛 #11018

* 🐛 #11018

* 🎨 刚创建时无 id,更新需和 oldValue 保持一致

* 🐛 Database date field between filter calculation error Fix #10979

* 🐛 Primary key value unexpectedly updated when database adds row #11018

* 🎨 #11013

* 🎨 搜索可汇总字段时排除行号类型字段 #11008

* 🎨 lineNumber no need to join the calc op and remove useless todo tag

---------

Co-authored-by: Vanessa <lly219@gmail.com>
Co-authored-by: Daniel <845765@qq.com>
@88250
Copy link
Member

88250 commented Apr 14, 2024

目前取消绑定后 ID 不会改变,还是原来的 ID,所以再关联时还是继续关联到这一行数据上。

需要考虑下解绑时是否同时更换 ID。

@88250 88250 reopened this Apr 14, 2024
@88250 88250 changed the title 数据库中不存在,显示已绑定 改进数据库解绑块 Apr 14, 2024
@88250 88250 self-assigned this Apr 14, 2024
@88250 88250 changed the title 改进数据库解绑块 Improve database unbind block Apr 15, 2024
88250 added a commit that referenced this issue Apr 15, 2024
@88250 88250 added this to the 3.0.10 milestone Apr 15, 2024
88250 added a commit that referenced this issue Apr 15, 2024
Vanessa219 added a commit that referenced this issue Apr 15, 2024
@88250 88250 closed this as completed Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants