InvalidOperationException ("Type 'ConsoleApplication1.Recycled' is not found.")
asked May 14 '14 at 02:52
Technically, there is nothing wrong with this behavior. You use same model in both cases. In the first case DataObjects.Net ignore all recycled types and doesn't create tables. In the second case, DataObjects.Net tries to create RenameTypeHint for each type which marked as recycled. But it does not find ConsoleApplication1.Recycled in old model, because ConsoleApplication1.Recycled wasn't created in database in the first case.
RecycledAttribute helps to rename type without manual creation of RenameTypeHint on upgrade from one model to another. If old name of type was not defined in attribute, DataObjects.Net tries to remove specified suffix from namespace of new type and defines name of old type by this value.
But logically, it is incorrect behavior. Dataobjects.Net should not create hints automatically or must throw exception if it does not find type with old name in old model.
Thank you for your report. We will fix it in next version of DataObjects.Net.
answered Jun 04 '14 at 04:51