如何限制Hybris中的插入? [英] How do I restrict insert in Hybris?

查看:64
本文介绍了如何限制Hybris中的插入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像我知道的那样,我可以使用SearchRestrictions来限制get操作.但是insert_update呢?例如,我要删除插入带有CHECK批准状态的产品的机会.

Like I know, I can use SearchRestrictions to restrict get operations. But what about insert_update? For instance, I want to remove an opportunity to insert Products with CHECK approvalStatus.

推荐答案

搜索限制无法正常工作.它们限制了针对数据库的查询.如何?您添加到搜索限制中的条件将添加到查询的select语句的where子句中. INSERT查询没有where子句.至少不是使用impex时生成的那些.

Search restrictions don't work like that. They restrict queries that are made against the database. How? The condition you add to a search restriction is added to the where clause of the select statement of the query. An INSERT query does not have a where clause. At least not those, that are generated when using impex.

impex不是适合您目的的正确工具. Impex仅应用于导入无缺陷的数据.这只是将数据插入数据库的一种更简单的方法,就像sql中的插入语句一样.您不希望Impex文件中的数据需要进一步检查.

Also impex is not the right tool for your purpose. Impex should only be used to import flawless data. It is just a simpler way of inserting data into a database, just like an insert statement in sql. You don't want data in an impex file that needs further checks.

只需过滤那些具有不希望有的值的行.然后,您可以导入其余的内容.

Just filter those lines, that have undesired values. Then you can import the rest.

这篇关于如何限制Hybris中的插入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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