Refactor the InputChoices -- ProductTemplateFields tables

Post feature requests to this forum and a pre-configured poll will automatically be created for you.
Post Reply
seanhoward
Ensign (ENS)
Ensign (ENS)
Posts: 17
Joined: Fri Oct 02, 2009 3:01 pm

Refactor the InputChoices -- ProductTemplateFields tables

Post by seanhoward » Tue Nov 03, 2009 5:18 pm

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.

seanhoward
Ensign (ENS)
Ensign (ENS)
Posts: 17
Joined: Fri Oct 02, 2009 3:01 pm

Re: Refactor the InputChoices -- ProductTemplateFields tables

Post by seanhoward » Tue Nov 03, 2009 5:31 pm

While you're at it, re-define the primary key on ProductTemplateFields as ProductID + InputChoiceID, instead of the ProductTemplateID. No duplicates!!!

Thanks,
Sean

Post Reply