Referential Integrity for TX_CUST_KEYWORD values

I have to assume my discovery is by design.

If I create an entry in "T_KWCODED_VALUES" and specify a value for the "key_value" field, then refer to that value by assigning it to a customer within the "TX_CUST_KEYWORD" table, then change the original value of the "key_value" field in "T_KWCODED_VALUES", then the "key_value" field in "TX_CUST_KEYWORD" is not automatically updated to match the modified value.

I am wondering how this is typically handled?  I am building some custom web code, and I want to join these two tables with the join clause partially conditioned by the "key_value" field.  But if I go into the T_KWCODED_VALUES table and change the value, then the attributes on the customer are not automatically updated, and so my join "breaks".

Is there a better way to do this?

Thanks!

Parents
  • Hi Larry -

    You've found one of my favorite things to growl at... Unfortunately, there isn't a better way to do that join that I know of (oh please let me be wrong), and yes, they can completely get off if someone changes the value. 

    The only fix I've found is to write a sql script that runs nightly and checks against modified values and then updates them with the proper one. 

    - Heather

Reply
  • Hi Larry -

    You've found one of my favorite things to growl at... Unfortunately, there isn't a better way to do that join that I know of (oh please let me be wrong), and yes, they can completely get off if someone changes the value. 

    The only fix I've found is to write a sql script that runs nightly and checks against modified values and then updates them with the proper one. 

    - Heather

Children
No Data