Broadleaf DemoSite Delete Products -


i installed demosite version of broadleaf. when try delete product /admin section. following error message.

org.hibernate.exception.constraintviolationexception: cannot delete or update parent row: foreign key constraint fails (broadleaf.blc_product, constraint fk5b95b7c96d386535 foreign key (default_sku_id) references blc_sku (sku_id))

i understand there foreign key constraint on sku table. shouldn't auto delete sku's related whenever delete product. if not how can delete sku's first. tried deleting product options first. dint helped either.

quite old post , don't know how relevant might others. apart workaround broadleaf supports soft delete instead of hard delete.

you can archive product , won't show anywhere in admin & site. found useful since @ times might require product again later on in future , can archive state if have soft deleted it.

broadleaf has column "archived" in table blc_product. need add flag "y" in order archive product , later on remove recover product back.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -