Refactor the InputChoices -- ProductTemplateFields tables
-
- Ensign (ENS)
- Posts: 17
- Joined: Fri Oct 02, 2009 3:01 pm
Refactor the InputChoices -- ProductTemplateFields tables
This probably won't rate very high on many peoples lists, but here goes. It seems to me that the ProductTemplateFields table should store the ProductID and the InputChoiceID NOT the ChoiceValue. That way, we could change the ChoiceValue without orphaning the products that refer to it. I'm using the trigger that I found on this board, but my values are non-unique. Because this is a non-unique field, I didn't realize that was going to be a problem. I can workaround, but this seems like it is a relatively easy fix for the developers.
-
- Ensign (ENS)
- Posts: 17
- Joined: Fri Oct 02, 2009 3:01 pm
Re: Refactor the InputChoices -- ProductTemplateFields tables
While you're at it, re-define the primary key on ProductTemplateFields as ProductID + InputChoiceID, instead of the ProductTemplateID. No duplicates!!!
Thanks,
Sean
Thanks,
Sean