为什么某些属性存在于 "productslp" 而不是 "products" table 在 Hybris 中?

Why some Attribute exist on "productslp" but not "products" table in Hybris?

为什么 Product itemtype 中定义的产品 attribute 未显示在 products table 中,但 productslp table 中显示?

*用于本地化的 lp 文件。您的属性有本地化选项。

示例:p_name、p_description。在 cores-item.xml 文件中:

 <itemtype code="Product"
              extends="GenericItem"
              jaloclass="de.hybris.platform.jalo.product.Product"
              autocreate="true"
              generate="true">
        <deployment table="Products" typecode="1" propertytable="ProductProps"/>
        <attributes>
            <attribute autocreate="true" qualifier="code" type="java.lang.String" generate="true">
                <persistence type="property"/>
                <modifiers read="true" write="true" search="true" initial="true" optional="false" unique="true"/>
                <custom-properties>
                    <property name="hmcIndexField">
                        <value>"thefield"</value>
                    </property>
                </custom-properties>
            </attribute>
            <attribute autocreate="true" qualifier="name" type="localized:java.lang.String">
                <modifiers read="true" write="true" search="true" optional="true"/>
                <persistence type="property"/>
                <custom-properties>
                    <property name="hmcIndexField">
                        <value>"thefield"</value>
                    </property>
                </custom-properties>
            </attribute>
            <attribute autocreate="true" qualifier="unit" type="Unit" generate="true">
                <persistence type="property"/>
                <modifiers read="true" write="true" search="true" optional="true"/>
            </attribute>
            <attribute autocreate="true" qualifier="description" type="localized:java.lang.String">
                <modifiers read="true" write="true" search="true" optional="true"/>
                <persistence type="property">
                    <columntype database="oracle">
                        <value>CLOB</value>
                    </columntype>
                    <columntype database="sap">
                        <value>NCLOB</value>
                    </columntype>
                    <columntype>
                        <value>HYBRIS.LONG_STRING</value>
                    </columntype>
                </persistence>
                <custom-properties>
                    <property name="hmcIndexField">
                        <value>"thefield"</value>
                    </property>
                </custom-properties>
            </attribute>
            <attribute autocreate="true" qualifier="thumbnail" type="Media">
                <persistence type="property"/>
                <modifiers read="true" write="true" search="true" optional="true"/>
            </attribute>
            <attribute autocreate="true" qualifier="picture" type="Media">
                <persistence type="property"/>
                <modifiers read="true" write="true" search="true" optional="true"/>
            </attribute>
        </attributes>
        <indexes>
            <index name="Product_Code">
                <key attribute="code"/>
            </index>
        </indexes>
    </itemtype>

我看到 obove.but 定义的属性在 table 产品中看不到。注意:

<deployment table="Products"...>

什么意思?

PRODUCTSLP 是产品项目的语言 table,如果项目中定义了任何本地化属性,则这些数据将根据 LP table 存储。此 table 创建和连接将由 hybris 在内部完成。

注意:您可以在各自的 table 中找到前缀为 p_ 的每个属性。 name 将存储在 p_name

用于项目类型的部署元素在数据库上保存 table 名称。类型属性中的本地化值 该属性的含义需要按语言进行本地化。所以 hybris 会自动创建另一个后缀为 lp 的 table。