Hi Broadleafer,
This was the first thing that I suspected, I've made a check in the table and I found that the foreign key is really present ! After triple checking the foreign keys and all the references, I decided to drop the FK for SEARCH_FACET_ID on BLC_CAT_SEARCH_FACET_XREF. After that I could manually run the INSERT without problem. So I reverted my INSERT and tryed to rebuild the Foreign Key and the MySQL GUI won't allow me ! And he doesn't give any error. So I have the feeling that I am in front of some kind of currupted Foreign Key. I am running MYSQL on my Mac Bookpro OX Mountain Lion. So maybe this is related to my version of MySQL. I'll dig in this direction !
Thx for the heads up !
EDIT :
I have some news ! I made some tests and by dropping the foreing keys and rebuilding it inside the load_catalog_data.sql, I was able to properly process the entire script file upon initial load. But now, I have the same problem with another foreign key inside load_content_data
Code: Select all
INSERT INTO BLC_PAGE (PAGE_ID, DESCRIPTION, PAGE_TMPLT_ID, FULL_URL, DELETED_FLAG, ARCHIVED_FLAG) VALUES (1, 'About Us', 1, '/about_us', FALSE, FALSE);
causes the following error :
Code: Select all
Cannot add or update a child row: a foreign key constraint fails (`dfbroadleaf`.`blc_page`, CONSTRAINT `FKF41BEDD5D49D3961` FOREIGN KEY (`PAGE_TMPLT_ID`) REFERENCES `BLC_PAGE_TMPLT` (`PAGE_TMPLT_ID`))
I don't want to add explicit foreign key dropping and rebuilding in every SQL files. Looks like Hibernate is creating invalid foreign keys upon my initial load. Does anyone had already experienced that issue ?
Thanks in advance ! I might launch a dedicated topic for this.