Extend ProductImpl to MyCustomProductImpl
Posted: Thu Jun 04, 2015 4:30 am
I had gone through the below link and done according to it and i wanted to add supplier to product in admin console.
And its working fine without any problem.
http://forum.broadleafcommerce.org/viewtopic.php?f=13&t=2041&start=10
But the thing is when i click on (+ Add Product) in admin, i am getting three things,
Product
Product Bundle
MyCustomProductImpl {Newly came}
1. And what all changes i made (i.e., supplier) is only visible in MyCustomProductImpl tab (when clicked) and not available in Product tab (when clicked). I want to know how to merge this and make that supplier should come in Product tab.
2. When i add any product through MyCustomProductImpl tab, its successfully added to the db and also supplier is stored in MY_CUSTOM_PRODUCT table. BUT when i add that product to cart it added but i not able to go to that cart and also in the admin i am not able to delete that product.
i am getting this error,
org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:74)
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
And its working fine without any problem.
http://forum.broadleafcommerce.org/viewtopic.php?f=13&t=2041&start=10
But the thing is when i click on (+ Add Product) in admin, i am getting three things,
Product
Product Bundle
MyCustomProductImpl {Newly came}
1. And what all changes i made (i.e., supplier) is only visible in MyCustomProductImpl tab (when clicked) and not available in Product tab (when clicked). I want to know how to merge this and make that supplier should come in Product tab.
2. When i add any product through MyCustomProductImpl tab, its successfully added to the db and also supplier is stored in MY_CUSTOM_PRODUCT table. BUT when i add that product to cart it added but i not able to go to that cart and also in the admin i am not able to delete that product.
i am getting this error,
org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
org.hibernate.exception.ConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:74)
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`broadleaf`.`blc_product`, CONSTRAINT `FK5B95B7C96D386535` FOREIGN KEY (`DEFAULT_SKU_ID`) REFERENCES `blc_sku` (`SKU_ID`))
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)