I use DataObjects.Net on the NorthWind database. When I start my program, it gives this exception:

Test method Northwind.Tests.LightspeedTest.BooleanAny threw exception: 
Xtensive.Orm.SchemaSynchronizationException: Extracted schema is not equal to the target schema. Details:
Schema comparison result: NotEqual
Has unsafe actions: true
Has column type changes: false 
Compatible in ValidateLegacy mode: unknown

Unsafe actions:
  RemoveNode, Path=Tables/dbo:Orders
  RemoveNode, Path=Tables/dbo:Products
  RemoveNode, Path=Tables/dbo:Order Details
  etc... for every table

It appears to me that it wants to delete all tables, and if I use UpgradeMode recreate, I lose all tables. How can I solve this?

asked Nov 08 '12 at 10:40

Sjoerd's gravatar image


One Answer:

Hello Sjoerd,

DataObjects.Net defaults to automatically maintaining database schema according to your persistent types. This is the main and recommended approach.

Alternatively you could use externally maintained database schema but this mode have some limitations.

answered Nov 08 '12 at 13:00

Denis%20Krjuchkov's gravatar image

Denis Krjuchkov

Denis, thank you for your answer. I already have persistent types, ver much like this file. Why doesn't DO use those types?

(Nov 09 '12 at 03:42) Sjoerd Sjoerd's gravatar image

If I use LegacySkip I get the exception "Type 'Northwind.DataObjects.Product' is not found in model."

(Nov 09 '12 at 03:49) Sjoerd Sjoerd's gravatar image

Have you registered Product type in DomainConfiguration? Also it's worth to mention that model from ormbattle is not real northwind but rather northwind-inspired custom model. So it's not compatible even in legacy mode.

(Nov 10 '12 at 02:03) Denis Krjuchkov Denis%20Krjuchkov's gravatar image
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA