Subj.
Old code:
public class ProductionServiceProvisionActService : SevRGasEntity {
...
}
New code:
[HierarchyRoot]
public class ProductionServiceProvisionActService : Entity {
...
}
Erro & stack trace: "Sequence contains no matching element"
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
at Xtensive.Storage.Upgrade.HintGenerator.GenerateTypeIdFieldRemoveHintsForConcreteTable()
at Xtensive.Storage.Upgrade.HintGenerator.GenerateHints(IEnumerable`1 upgradeHints)
at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildSchemaHints(StorageInfo extractedSchema, StorageInfo targetSchema)
at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.<>c__DisplayClass7.<CreateBuilderConfiguration>b__3(StorageInfo extractedSchema, StorageInfo targetSchema)
at Xtensive.Storage.Building.Builders.DomainBuilder.SynchronizeSchema(SchemaUpgradeMode schemaUpgradeMode)
at Xtensive.Storage.Building.Builders.DomainBuilder.BuildDomain(DomainConfiguration configuration, DomainBuilderConfiguration builderConfiguration)
at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.BuildStageDomain(UpgradeStage stage)
at Xtensive.Storage.Upgrade.UpgradingDomainBuilder.Build(DomainConfiguration configuration)
at Xtensive.Storage.Domain.Build(DomainConfiguration configuration)
at Egs.Data.Common.DomainProvider.GetDomain() in D:\Work\DO\SevRGas\EGS\Data\Egs.Data\Common\DomainProvider.cs:line 30
Buggy code:
var typeIdField = type.Fields.Single(f => f.IsTypeId);
var targetType = typeMapping[type];
var targetTypeIdField = targetType.Fields.Single(f => f.IsTypeId);
Likely, the exception is thrown @ the last line.
Original issue reported on code.google.com by alex.yakunin on 18 Oct 2010 at 5:37
Original issue reported on code.google.com by
alex.yakunin
on 18 Oct 2010 at 5:37