Marcus wrote:
Frans,
What happens when I change a table name in the database and refresh the catalog?
I have some refactoring to do which includes changing some table names. I seem to remember that the designer simply removes the Entities mapped to the removed table from the list... and hence removes all my hard work in renaming and hiding the related fields etc...
I think it's good that you check out the new features added to the preferences in 1.0.2005.1 Especially the settings which will show you a dialog in which you can select the targets for entities which targets are apparently not available (e.g. renamed ). LLBLGen Pro can find renamed tables btw, though if you don't want to rely on that, simply use that new feature. You should also take a look into the refresher preference which will sync names with target element names, like table/view names and field names automatically.
Can you recommend a way to do this which has the least impact on the project file?
Well, for everything: switch on the backup creation preference for the refresher. That way, you always have a backup for the situation when things go wrong.
Can I hack the project file itself by simple directly changing the table / entity names and then do a refresh (remember DiskDoctor) ?
[edit] Could I use the ProjectInspector code to help make these changes?
Marcus
The projectinspector shows you the objectmodel indeed, the point is though that your catalog should be migrated as well. It's in general easier to rely on the features offered by the designer to get the mappings migrated. With the new preference (it's called 'ManuallySelectRenamedTargetsAfterRefresh') it's even easier and you won't run into the risk that entities got removed because the refresher can't find the target
You can also do your refactorings of the db in multiple steps:
- first rename the tables, refresh
- check the mappings in the entity overview listing (rightclick on 'Entities', select 'View entity list')
- if ok, proceed by removing/adding fields, fks etc. refresh.