【问题标题】:How to move the data from the supper type to the sub type in Hybris?如何将数据从 supper 类型移动到 Hybris 中的子类型?
【发布时间】:2023-01-19 14:27:50
【问题描述】:

我想向我的自定义模型添加新属性(定制服装产品), 它从 ApparelProduct 模型 (服装产品模型已经从产品型号- SAP 核心模型)。

扩展项.xml

<typegroup name="Apparel">
            <itemtype code="ApparelProduct" extends="Product"
                      autocreate="true" generate="true"
                      jaloclass="de.hybris.training.core.jalo.ApparelProduct">
                <description>Base apparel product extension that contains additional attributes.</description>
                <attributes>
                    <attribute qualifier="genders" type="GenderList">
                        <description>List of genders that the ApparelProduct is designed for</description>
                        <modifiers/>
                        <persistence type="property"/>
                    </attribute>
                </attributes>
            </itemtype>

            <itemtype code="CustomApparelProduct" extends="ApparelProduct"
                      autocreate="true" generate="true" > // My custom type
                <description> Custom Apparel Product that contains total amount attributes</description>
                <attributes>
                    <attribute qualifier="amount" type="java.lang.Integer">
                        <description>Total buying amount </description>
                        <modifiers/>
                        <persistence type="property"/>
                        <defaultvalue>Integer.valueOf(0)</defaultvalue>
                    </attribute>
                </attributes>
            </itemtype>

但是,当我使用 FlexibleSearch 转到 Hybris 管理控制台检查新类型的数据时。结果是所有字段都缺少数据。 (下图来自我定制服装产品类型)

同时,当我检查 flexibleSearch for服装产品类型和产品键入所有发回其中充满数据字段的表。 (下图来自服装产品类型)

我不知道我需要做什么才能将原始数据从产品我的新类型定制服装产品(原始数据是使用 impex 和 csv 文件插入到系统中的——选择插入的类型是产品).我如何将新数据传输到我的自定义类型。感谢您的支持。

【问题讨论】:

  • 你还有用来插入数据的 impex 吗?我会编辑 impex 以删除所有内容,然后将它们再次插入到新类型中。

标签: sap-commerce-cloud


【解决方案1】:

您不能从类型 A 更改为类型 B。

您需要迁移数据。即删除 A 类项目。重新插入/创建项目作为类型 B。另外,检查是否有其他依赖项需要更新。

【讨论】:

    猜你喜欢
    • 2011-04-30
    • 1970-01-01
    • 1970-01-01
    • 2019-09-07
    • 2021-10-20
    • 2022-01-06
    • 1970-01-01
    • 2012-12-21
    • 1970-01-01
    相关资源
    最近更新 更多