cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to update an OOTB attribute set as unique=true and write=false

0 Likes
407

Hi All,

There is an OOTB attribute called 'name' defined inside PointOfService item-type in items.xml which I would like to update.

<attribute qualifier="name" type="java.lang.String"> <modifiers initial="true" write="false" read="true" optional="false" unique="true" /> <persistence type="property" />

In cutom-items.xml file there is a index which is throwing the exception when trying to update.

<indexes> <index name="hdCodeIdx" unique="true" replace="true"> <key attribute="hdCode" /> </index> </indexes>

Exception : org.springframework.dao.DuplicateKeyException: query; SQL []; integrity constraint violation: unique constraint or index violation: HDCODEIDX_2040; nested exception is java.sql.SQLIntegrityConstraintViolationException: integrity constraint violation: unique constraint or index violation: HDCODEIDX_2040, transaction rolled back because it has been marked as rollback-only.

Please help figure out a way to update this attribute.

Thank You

Accepted Solutions (0)

Answers (0)