I have a PartsMaster table in database A, and a [PARTS MASTER] table in database B. The A table has been in existence in my project for quite some time. Today, I needed to access the older B table and incorporate it into my project. I was going to call it oldPartsMaster; however, when I added the class, the name was automatically changed to PARTSMASTER (space was removed). This is not good, because when I renamed the table to oldPartsMaster, it deleted the original PartsMaster.cs file. Now, when I save the ORM and rebuild the Model project, it errors, stating that the PartsMaster.cs file is not found. And, it really
isn't there anymore. I closed the object mapper and told it not to save the changes (too late!). Even if I open it again and try to recreate the table, I get the same error.
Solution: Delete from the ORM the PartsMaster class that is missing. Add the oldPartsMaster class. ReAdd the PartsMaster class. Save.
The BIG problem now is recreating any custom code in the PartsMaster class that was lost: Create method, Custom properties, etc. I did not even think to record this elsewhere before making these changes. Long ago, I removed VSS because it caused far more problems that it is worth. My next option is to find a backup. At least, I could copy/paste the customizations into the newly created class.
Has IdeaBlade considered this renaming thing and the potential damage to existing classes? Any solutions on your part? Perhaps I am doing something wrong in my approach.
Thanks!
Bill