本文介绍了如何在OrderDetails与Product绑定时删除产品并保留订单历史记录。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我目前正面临着一点点狂欢。你看我有这个产品/购物车/订单系统。在这个系统中,我将OrderDetails表连接到Product表,其关系为One Product可以有很多OrderDetails。



如果用户想要删除他们的产品之一,我怎么能坚持OrderDetails,以便从删除产品的用户购买产品的任何用户仍将维护所有OrderDetails。我们的想法是将产品与OrderDetails分离,并为OrderDetails表添加冗余。



你有什么想法?如果您需要更多说明,请告诉我!!!



谢谢,

robNo

Hi All,

I am currently facing a little bit of a delima. You see I have this product/shopping cart/order system. In this system I have the OrderDetails table coupled to the Product table with a relationship of One Product can have many OrderDetails.

If a user wanted to delete one of their products, how could I persist the OrderDetails so that any user that purchased a product from the user that deleted the product will still maintain all of the OrderDetails. A thought is to decouple Products from OrderDetails and add redundancy to the OrderDetails table.

What are your thoughts? Let me know if you need more clarification!!!

Thanks,
robNo

推荐答案

AND ActiveProduct=1


这篇关于如何在OrderDetails与Product绑定时删除产品并保留订单历史记录。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 03:53