如何从 openbravo 中的 m_product 表中删除产品
如何从openbravo中的m_product表中删除特定产品,因为它有触发器并且与其他表相链接
how to delete a particular product from m_product table in openbravo , Because it has triggers and are interlinked with other tables
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不认为执行 SQL 删除是一个好的选择,因为有一些表与特定产品相关(例如会计信息)。
在应用程序级别,如果产品已从另一个表(如订单)引用,您将无法删除它。但是,您随时可以停用该记录,实现产品的逻辑删除。
I don't think doing a SQL delete is a good choice, since there are some tables related with a particular product (like accounting information).
At application level, if the product is already referenced from another table (like an Order), you wont be able to delete it. However, you can always de-activate the record, achieving a logic deletion of the product.
当您使用数据库查询删除时,它会自动提示您与表名一起使用的链接项。您可以在那里删除依赖项。如果您想自动化它,请参考 openbravo 中的链接项目实现,并使用它作为基础来找出它的链接位置并将其删除。
谢谢,
香卡
When you delete using database queries, it will automatically prompt you the linked items where it is being used with the table names. You can remove the dependencies there. If you want to automate it, refer the linked items implementation in openbravo and use that as a base to find out where it is linked and remove them.
Thanks,
Shankar
您可以使用以下选项
1) 您可以考虑将产品标记为非活动或已停止,而不是删除条目,以便产品在其他窗口和报告上不可用/可见
2) 首先删除所有链接的项目,然后从 UI
3 中删除产品条目)如果要删除,使用SQL语句-首先删除所有引用(链接表数据)或暂时关闭触发器并删除
You may use following options
1) Instead of deleting entry you may consider marking product as inactive or discontinued, so that product will not be available/visible on other windows and reports
2) Delete all linked items first, then delete product entry from UI
3) If you are deleting, using SQL statements - first delete all references(linked tables data) or temporarily turn off triggers and delete