on ‎2023 Feb 11 1:15 PM
Here's the itemtypes I have defined:
Now whenever I try to add the productsCategories to PointOfService from backoffice I get the error mentioned above.
Any help would be appreciated
// ProductCategories collection
<collectiontype code="ProductCategories" elementtype="ProductsCategory" autocreate="true" generate="false" type="list" />
<itemtype code="ProductsCategory" generate="true" autocreate="true">
<deployment table="ProductsCategory" typecode="30145" />
<attributes>
<attribute qualifier="name" type="localized:java.lang.String">
<description>Name of the category</description>
<persistence type="property" />
<modifiers write="true" read="true" />
</attribute>
<attribute qualifier="availableProducts" type="localized:java.lang.String">
<description>Available products for the category</description>
<persistence type="property" />
<modifiers write="true" read="true" />
</attribute>
</attributes>
</itemtype>
<itemtype code="PointOfService" generate="false" autocreate="false">
<attributes>
<attribute qualifier="productsCategories" type="ProductCategories">
<persistence type="property" />
<modifiers read="true" write="true" />
</attribute>
</attributes>
</itemtype>
Request clarification before answering.
Looking at the log, usually that was because of change in the type of the attribute.
For example, let's say at first my item type was like these:
<itemtype generate="true" code="ThisTestNewItemType">
<attributes>
<attribute qualifier="city" type="java.lang.String">
<description>This is to show that at first I create item type with String type</description>
<modifiers optional="false"/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>And then, I do update system, so the column will be created in database with nvarchar type.
Then, I want to change it to some item type, instead of String, so my item type will look like these:
<itemtype generate="true" code="ThisTestNewItemType">
<attributes>
<attribute qualifier="city" type="City">
<description>This is to show that at first I create item type with String type, then change it to some item type</description>
<modifiers optional="false"/>
<persistence type="property"/>
</attribute>
</attributes>
</itemtype>And then, I do update system, but hybris will not change the column type in database, so it stays as nvarchar, for item type attribute, the column in database should be bigint. You have 4 options:
1. in HAC -> maintenance -> clean up -> Type System, clear all orphaned types, then do update system, or
2. Change the qualifier name, then do update system, or
3. Delete the column manually from database, then do system update, or
4. Alter the column manually from database, then do system update
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.