使用复合键删除实体的EntityRef [英] removing EntityRef of entity with a composite key
本文介绍了使用复合键删除实体的EntityRef的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
好的,我刚刚遇到了一些蠢蛋。我有一个WorkOrder表,它与我的Orders表有多对一的关系。以前,我的WorkOrder表的主键是WorkOrderID(bigint)。我的订单表的主键是OrderID(bigint)。但我意识到我希望我的WorkOrder表的主键是OrderID,WorkOrderNumber(int)。
Ok, I just ran into a bit of a doosey. I have a WorkOrder table which is in a many to one relationship with my Orders table. Previously, my WorkOrder table's primary key was WorkOrderID(bigint). My Orders table's primary key is OrderID(bigint). But I realized I wanted the primary key of my WorkOrder table to be OrderID, WorkOrderNumber(int).
推荐答案
很抱歉再次提出这个问题,但这是一个重要问题,我不能让它死掉。答案只是在我的表中有两列OrderID吗?我不喜欢它的想法,但如果这是它必须的方式......那就这样吧。有人可以帮忙吗?
Sorry to bring this up again, but it's an important issue and I can't let it die. Is the answer simply going to be to have two columns for OrderID in my table? I don't like the idea of it, but if that is the way it has to be... then so be it. Could someone help?
这篇关于使用复合键删除实体的EntityRef的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文