I wanted to try DO4 (4.2.0). My DB is SQL Server 2008. UpgradeMode="Recreate" I had 2 classes based on Entity and 5 DB tables And ALL my tables were deleted! I saw only 3 service tables Metadata.Assembly, Metadata.Extension, Metadata.Type Cool and unique feature. fortunately, it was test DB. Updated at 15.05.2010 19:15:09As you know programmers a very lazy by nature. I didnt expect these dangerous modifications from simple ORM. I had 2 classes mapped on tables, but these tables were deleted too. :D Updated at 15.05.2010 19:21:06Now I set upgradeMode="Recreate" I have 2 classes
Whe I try to run my application I receive 'Type 'BookShopData.DomainModel.Book' is not found in model.' This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by VoimiX. |
But UpgradeMode="Recreate" implies exactly this: all the tables must be deleted and new ones are created. You must use e.g. PerformSafely upgrade mode to ensure no data is lost on schema upgrade. Or, do I understand you correctly: the issue is that such behavior is unexpected, when you're trying DataObjects.Net for the first time? Can you send me either a sample (alex @ our web site dot com), or publish full stack trace here? The issue is related to Domain.Build or configuration (App.config or programmatic), but there is no code related to this. Concerning "Recreate" - partially, you're right... It's like "Format C:" hidden somwehere in App.config :( Moreover, we use this more intentionally everywhere in samples, since it allows to run them on the same database w/o caring about the schema. But I'm not sure what we can do here - so any ideas are welcome. Btw:
|