MS Lightswitch Devs的反馈-带有两个路径的级联删除 [英] Feedback for MS Lightswitch Devs - Cascade delete with two paths

查看:102
本文介绍了MS Lightswitch Devs的反馈-带有两个路径的级联删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可能是这里使用次数最多的非编码用户(已将Acess广泛用于应用程序,仅使用由各自的构建器创建的查询和宏),并且只想指出一些确实应该做的事情琐碎的自动化.

I am likely the most non-coding user out here (have used Acess extensively for apps using only queries and macro's created with the respective builders) and just wanted to point out some things that really should be trivial to automate.

请考虑一个简单的两表系统,即Node和Arc,其中Arc具有一个FromNode和ToNode.如果要删除可能是从"或到"节点的节点,我想级联删除使用它的所有Arc.这适用于任何关系 我可以测试的数据库,SQL Server,Access,Oracle ...但是在Lightswitch中出现错误.

Consider a simple two table system, Node and Arc, where an Arc has a FromNode and a ToNode.  If I want to delete a Node which may be either the From or the To node, I want to cascade delete any Arc's using it.  This works in any relational database I can test, SQL Server, Access, Oracle...  But in Lightswitch I get an error.

这真的不应该是一个错误,我也不必为此编写代码.我意识到开发人员可以很轻松地解决这个问题,但是如果您的目标是非开发人员,那么您就不应该强迫人们为如此琐碎的事情编写代码.

This really shouldn't be an error and I shouldn't have to write code for it. I realize a developer can crunch this quite readily, but if your target is the non-developer then you shouldn't force people to write code for something this trivial.

 

 

推荐答案

John,

如果仅将级联删除放在仅一种关系上,则它实际上是有效"的.想要的方式.基本上,当您删除节点并使用它的弧线时,弧线也会被删除.

If you just put the Cascade delete on only one of the relationships, it actually "works" the way want.  Basically when you delete a node and there is an arc using it, the arc is also deleted.

但是,根据所删除的节点,您可能会或可能不会收到有关所有相关弧将被删除的警告.如果删除在关系上设置了级联删除的节点,则会收到警告,但删除该节点时 具有受限制的"节点的节点.在关系上,LS会使用该节点静默删除任何弧,而不会发出任何警告...可怕吗?是的,但是有效... 

HOWEVER, depending on the node you delete, you may or may NOT get a warning about the fact that any related arcs would be deleted.  If you remove the node that had cascade delete set on the relationship, you get the warning, but when you delete the node that had "restricted" on the relationship, LS SILENTLY deletes any arc using that node, without any warning... Scary? Yes, but it works... 


这篇关于MS Lightswitch Devs的反馈-带有两个路径的级联删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆