使用触发器处理 TeamSystem DB 中的计算字段
在我们的自定义流程中,有一些字段是计算字段。 今天,我使用团队系统事件和 Web 服务来计算这些事件,但老实说,它有点笨拙。 我必须添加延迟,因为一旦保存,TFSService 就会对工作项进行更改,人们可能想立即进行另一次更改,然后收到一条错误,表明工作项已更改。 因此该服务会等待一段时间以确保所有编辑都完成(我选择了 30 秒)。除此之外还不错。
我想知道数据库中的触发器是否是一个好的做法,或者在升级到较新版本(即 Team System 2010)时是否会导致问题。
有人这样做过或者对使用触发器有什么意见吗?
In our custom process there are a few fields that are calculated fields. Today I am using Team System events and a web service to calculated these but in all honesty its a little clunky. I had to add a delay because once saved the TFSService does make a change to the Work item a person might want to make another change right away and then get an error stating the Work Item has been changed. So the service waits a bit to make sure all edits are completed (I chose 30 secs.) Other than that its not bad.
I was wondering a trigger in the database would be a good practice or will it cause problems when upgrading to a newer version (i.e. Team System 2010).
Has anyone done this or have any comments on using a trigger?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好保持数据库原样,以防您所做的任何更改干扰其运行。
但话虽如此,只要您编写触发器创建和删除的脚本,并在升级之前将删除脚本应用到数据库,就应该没问题。
It's probably best to leave the database as is, in case any changes you make interfere with its running.
But having said that, as long as you script your trigger creates and drops, and apply the drop scripts to the database before upgrading, you should be OK.