MrBaseball34 Posted August 3, 2010 Share Posted August 3, 2010 Let's say I am writing a custom import routine to import my vendor's inventory. I have a function to insert the product images into the ps_image table.Now, since you don't have a unique index on id_image id_product, position, cover, I can insert as many items as I want with the same id_product, position, cover.This causes great problems in the LEFT JOIN with ps_image in Search class because it will return multiple products if you only have one product in ps_product but have > 1 image in ps_image.Modifying my INSERT to use either INSERT IGNORE or ON DUPLICATE KY does not work because there would be no duplicate key if id_image is not included in any key with the other columns.BAD architecture....Please justify to me why you don't need to rework the primary key to include ALL columns and drop the other keys.Although I don' t use your import process, I wonder if it would do the same thing.I am going to use PHP in my import process to subvert this problem but you really should take a look at it. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 16, 2010 Author Share Posted August 16, 2010 I would appreciate a comment by ANY of the PrestaShop developers.Or are you just chicken and don't want to face up to your inability to properly architect this product? Link to comment Share on other sites More sharing options...
rocky Posted August 16, 2010 Share Posted August 16, 2010 You should post a bug report if you believe an index needs to be added to the ps_image table. The PrestaShop developers read all the bug reports, but not all the forum posts. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted August 17, 2010 Author Share Posted August 17, 2010 You should post a bug report if you believe an index needs to be added to the ps_image table. The PrestaShop developers read all the bug reports, but not all the forum posts. Ain't that the freaking truth. They care more about getting a new flawed version out than helping people with the flawed version they already released. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now