Reputation: 403
I had an attribute in an itemtype defined to be String. I changed the type of the attribute to Enumeration. However I am trying to update the existing values with an INSERT_UPDATE
to one of the existing enum values and getting the following exception:
java.sql.SQLException: Fail to convert to internal representation
How to go about in this case?
Upvotes: 0
Views: 5581
Reputation: 75
System update won't change the dataType. For Local: you can do an initialize with the new sample data.(for that particular Enum change).
For higher environments: You have to directly operate on the database. Alter the database column data first with the corresponding ENUM's PK value and then change the type of the database column to LONG
Upvotes: 0
Reputation: 974
The problem is the same as your previous question. (Redefining data type in items.xml in Hybris is not wise to change the type of an attribute. I would recommend to create a new field (with different name and use it for future) or just restore a previous copy of your DB.
Upvotes: 1
Reputation: 1
I had this kind of error only when I don't update the system via HAC.
Upvotes: 0