Page 1 of 1

Multiship Option issues when deleting/merging cart

Posted: Thu Sep 12, 2013 9:24 am
by ig0r
in our project we use the multiship option blc_order_multiship. its causeing problems when trying to delete/merge the cart, because BL is not cascading the delete of an order to that table, so we see a lot of these:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`superdirect`.`BLC_ORDER_MULTISHIP_OPTION`, CONSTRAINT `FKB3D3F7D69AF166DF` FOREIGN KEY (`ORDER_ITEM_ID`) REFERENCES `BLC_ORDER_ITEM` (`ORDER_ITEM_ID`))
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
at java.lang.reflect.Constructor.newInstance(
at com.mysql.jdbc.Util.handleNewInstance(
at com.mysql.jdbc.Util.getInstance(
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.sendCommand(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.ConnectionImpl.execSQL(
at com.mysql.jdbc.PreparedStatement.executeInternal(
at com.mysql.jdbc.PreparedStatement.executeUpdate(
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(

so what i do currently is i override the BL implementation of OrderDaoImpl

public void delete(Order salesOrder) {
Order order = salesOrder;
if (!em.contains(order)) {
order = readOrderById(order.getId());
if (order instanceof ExtendedOrder) {
ExtendedOrder extendedOrder = (ExtendedOrder) order;


can we fix this in the BL framework, or am i missing something ? blc.version = 2.3.0-M2-5