>>>>If anyone has dealt with foreign keys in FPW 2.6 you probably already know my question. I have a tag on a table whose key is set to a related table. (I do this for display ordering and filtering) If the field is changed or modified, such as City being chaged from 'New York' to 'Los Angeles', the foreign tag in the other table will no longer be able to do an optimized locate or filter for that record. It simply gets skipped because the data has changed. I have a work around right now that when the contents are changed it deletes the record and then does a SQL INSERT. That works fine, but is there a more effective way to keep the foreign tag updated?
>>>
>>>Could you just REPLACE foreign tag field with new value?
>>
>>The field can be edited from several different applications. It's in a parent or entity table.
>
>But DELETE is not very good in this case either. I guess that robust way is to create some kind of transaction with locking multiple records and replacing values. If some record is edited then operation will be stopped with appropriate message.
There are too many modules and tables that relate into the entity. It wouldn't be practical plus it defeats the purpose of normalizing data and having an entiity or parent table to begin with.
Thanks for the suggestion, though.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement