cancel
Showing results for 
Search instead for 
Did you mean: 

ModelSavingException

Former Member
0 Kudos

Hello,

I have got this exception when trying to save 3 objects with "saveAll" method: de.hybris.platform.servicelayer.exceptions.ModelSavingException: Could not set given values because either attribute is not writable or does not exist within composed type CreditCardPaymentInfo (invalid=null, non-writable=[owner]) - roll back changes at de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.storeAttributes(ItemModelConverter.java:1228) at de.hybris.platform.servicelayer.internal.converter.impl.ItemModelConverter.save(ItemModelConverter.java:666) at de.hybris.platform.servicelayer.internal.model.impl.ModelWrapper.save(ModelWrapper.java:149) at de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.saveOthers(ResolvingModelPersister.java:106) at de.hybris.platform.servicelayer.internal.model.impl.ResolvingModelPersister.persist(ResolvingModelPersister.java:91) at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:1149) at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:1068) at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:742)

May anyone knows the root cause of this problem?

Thank you

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Look at the "CreditCardPaymentInfo" type in HMC / System / Types. Is the attribute owner writable?

neha_gupta03
Explorer
0 Kudos

Hi, Can you please tell me how to fix this issue as the same isue is coming for me in creationtime attribute

Former Member
0 Kudos

creationTime and modifiedTime are not writeable, they are maintained/updated automatically by the persistence layer

Former Member
0 Kudos

The problem cames from the attribute "owner" in the "CreditCardPaymentInfo" object. This attribute should be null in order to save the object, however we don't know why.

Former Member
0 Kudos

We have alredy done an update system which terminates with no error

former_member632755
Active Contributor
0 Kudos

Hi,

apparently you have forgotten to update the system (either via ant updatesystem or from the hac).

Cheers, Wojtek