Hi,

there are foreign key constraints from other tables (I guess product keywords). You first have to delete the product_keyword entities relating to your product before you can delete your product.

Regards,

Michael

Am 30.01.15 um 09:16 schrieb i...@agentur-m3.de:
Hi All,

I tried to create some test products (just product_id
and description and a user defined PRODUCT_TYPE_ID
"FLEAMARKETITEM")  using  a simple method.

ofbiz now gives me an error when deleting them.

Pressing delete-button the data engine says:

Delete failed (write error): org.ofbiz.entity.GenericEntityException:
org.ofbiz.entity.GenericDataSourceException: Exception while deleting
the following entity:
[GenericEntity:Product][productId,fleamarket(java.lang.String)] (SQL
Exception while executing the following:DELETE FROM OFBIZ.PRODUCT WHERE
PRODUCT_ID=? (DELETE on table 'PRODUCT' caused a violation of foreign
key constraint 'PROD_KWD_PROD_NEW' for key (fleamarket). The statement
has been rolled back.)) (Exception while deleting the following entity:
[GenericEntity:Product][productId,fleamarket(java.lang.String)] (SQL
Exception while executing the following:DELETE FROM OFBIZ.PRODUCT WHERE
PRODUCT_ID=? (DELETE on table 'PRODUCT' caused a violation of foreign
key constraint 'PROD_KWD_PROD_NEW' for key (fleamarket). The statement
has been rolled back.)))

Also I tried with SQL:

SQL Exception while executing the following:DELETE FROM PRODUCT WHERE
PRODUCT_TYPE_ID = 'FLEAMARKETITEM' (DELETE on table 'PRODUCT' caused a
violation of foreign key constraint 'PROD_KWD_PROD_NEW' for key
(fleamarket). The statement has been rolled back.)


So it seems I can't delete these items. What is going wrong?
How can I reset the entity state to correct relations?


Thank you!


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to