Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

These support forums are now closed for new topics and comments.
Please head on over to for support.

  • TJ 1 post 21 karma points
    Jun 24, 2015 @ 05:34

    ObjectDeletedException: deleted object would be re-saved by cascade

    Using uCommerce EditProductBasicProperties screen I am unable to delete the product. On clicking the red cross get the below error:

    Stack Trace: [ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations)[UCommerce.EntitiesV2.Product#105]] NHibernate.Impl.SessionImpl.ForceFlush(EntityEntry entityEntry) +653 NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event) +296 NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.PerformSaveOrUpdate(SaveOrUpdateEvent event) +413 NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event) +845 NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event) +327 NHibernate.Impl.SessionImpl.SaveOrUpdate(String entityName, Object obj) +223 NHibernate.Engine.SaveUpdateCascadingAction.Cascade(IEventSource session, Object child, String entityName, Object anything, Boolean isCascadeDeleteEnabled) +257

    Have read a lot through forums with others getting similar error but those are with custom logic around product deletion. This error is being generated out of ucommerce code and UI, hence, would really appreciate any help or ideas.

    1. I have 3 variants configured with a separate price

    2. On decompiling uCommerce assemblies and trying to trace back the error the last hint I got was the query in ProductDeleteEventListener class that deletes from ProductRelation, am pretty sure this error has nothing to do with it

    3. Another hint is that this error happens after parent product and its associations have been deleted and the first variant under that product is in the process of getting deleted

    4. I do not get this error if I do NOT put a transaction scope on the nHibernate session object

Please Sign in or register to post replies

Write your reply to: