mikeg22 wrote:
Otis wrote:
I'm a little undecided still if this is a bug or not. The thing is that if you set this to true, the names should be synced, however with a hierarchy on a single table and also multiple entities on a single table, it's not really paying off.
Excluding these, will make the feature work, however at the same time doesn't sync the names properly so why enabling it at all...
What do you suggest we should do, you're using this feature: should we exclude targets with multiple elements mapped onto it, or should we keep the feature as is and if you run into this (you're the first
) you should switch the feature off?
Not sure if this question was directed at me, but I'll answer anyways
One of the problems is that there is no distinction between when a user manually changes a name of a field or entity in the designer, and when the refreshed catalog changes. If I manually changed the name of an entity or field, I most likely don't want it changed back on the next refresh of the catalog, so I can't see when this would ever be the right thing to do. However, if an actual table name, or field name changes, any "non overriden" names should probably change also.
You mean a distinction between when a field is renamed by the user in the designer vs. when a field is renamed in the DB?
At the moment, the sync routine is ran after the refresh. So it checks all names, if they're the same as the mapping name would be. If not, it resets the name.
The sync routine is meant to reset names of entities of which the target table was renamed or target field was renamed etc.
You'll see a conflict of interest here: what if a hierarchy is mapped on such a table? Obviously it will lead to things like you experienced, however by excluding it, it makes the feature actually not useful: the reason it's there is bypassed.
I know this isn't a very good solution because how would you get an entity or field name back in sync? You could have checkboxes next to every entity and field which could exclude them from the sync process but that would be a pain.
All I can really say is that inherited entities and multiple entities based on the same table should almost definitely be always excluded from the sync process. That would solve our problem at least
heh
Yes I know, though I then think disabling the feature would be better. The refresh log tells you if an entity is mapped onto a different table/view. There's no feedback for if a field is now mapped onto a field with a different name. If I add that you could leave the feature off, and use the log. This rename detection isn't logged because it determines it's the same field so why log that it's mapped onto the same field (albeit renamed)...
I know it's not automatic, but it would give the information to correct the project, IF required, properly, as the code itself can't make this decision (IMHO).