Search code examples
exceptionintershop

OCAException while trying to update ProductPO custom attribute


We are getting following exception when trying to update custom attribute on ProductPO with UpdateCustomAttribute pipelet:

Caused by: com.intershop.beehive.orm.capi.common.OCAException: Could not UPDATE object: com.intershop.beehive.xcs.internal.product.ProductPO ...

Does anyone know why is that? Maybe because we hold ProductPO object which we try to update in session?

Any help is appreciated!


Solution

  • Common exception when you have multiple request/process updating the same object. See intershop ORMException could not update that explains this concept well.

    Holding the ProductPO in the session is a very bad idea. Intershop will not look through the session objects to sync product data. Better idea is to store the UUID and lookup the product each time you update it. UUID because with that you will hit the ORM cache and not the DB every time.