google-code-export / dataobjectsdotnet

Automatically exported from code.google.com/p/dataobjectsdotnet
0 stars 0 forks source link

CopyFieldHint \ MoveFieldHint does not work when reference field is moved in hierarchy #754

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The case is:

Old model:

class X {
}

class A {
}

class B : A {
  X Reference;
}

New model:

class X {
}

class A {
  X Reference;
}

class B : A {
}

Attempt to apply proper copy\move field hint leads to this error:

“Sequence contains no matching element”
  at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
  at Xtensive.Storage.Upgrade.HintGenerator.GenerateCopyColumnHint(CopyFieldHint  hint)
  at Xtensive.Storage.Upgrade.HintGenerator.GenerateCopyColumnHints(IEnumerable`1 hints)
  at Xtensive.Storage.Upgrade.HintGenerator.GenerateHints(IEnumerable`1 upgradeHints)

Original issue reported on code.google.com by alex.yakunin on 16 Jul 2010 at 7:45

GoogleCodeExporter commented 9 years ago

Original comment by alex.yakunin on 3 Sep 2010 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by alexey.g...@gtempaccount.com on 16 Nov 2010 at 11:35

GoogleCodeExporter commented 9 years ago
The possible reason of this error is incorrect upgrade hint. For example 
incorrect original class (or field) name. Class name must contains namespace.

Upgrade was modified to throw exception with detailed description for such 
cases.

Original comment by alexey.g...@gtempaccount.com on 19 Nov 2010 at 6:57