Hello,
According to Domain Resource Usage question's answer, I have upgraded to version 5.0.6 (after upgrade first to 5.0.5) to use StorageNode to use the same domain with many databases of the same structure. after modifying code to use StorageNode the following Exception being raised in old code when calling IsReferenced() method on an entity class:
Exception Message:
Index was outside the bounds of the array.
StackTrace:
at Xtensive.Orm.Linq.Materialization.MaterializationHelper.CreateSingleSourceMap(Int32 targetLength, Pair`1[] remappedColumns)
at Xtensive.Orm.Linq.Materialization.MaterializationContext.GetTypeMapping(Int32 entityIndex, TypeInfo approximateType, Int32 typeId, Pair`1[] columns)
at Xtensive.Orm.Internals.RecordSetReader.ParseColumnGroup(Tuple tuple, MaterializationContext context, Int32 groupIndex, RecordPartMapping mapping)
at Xtensive.Orm.Internals.RecordSetReader.ParseRow(Tuple tuple, MaterializationContext context, RecordPartMapping[] recordPartMappings)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at Xtensive.Orm.Rse.RecordSetExtensions.<ToEntities>d__a.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Linq.Enumerable.<ConcatIterator>d__71`1.MoveNext()
at Xtensive.Orm.Providers.SessionHandler.<GetReferencesToInternal>d__5.MoveNext()
at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
at Xtensive.Core.EnumerableExtensions.IsNullOrEmpty[TItem](IEnumerable`1 items)
at Xtensive.Orm.ReferenceFinder.IsReferenced(Entity target)
at Microtech.Infinity5.Model.Financial.GL.Currency.IsUsed() in d:\Work\Application\Microtech.Infinity5.Model\Financial\GL\Currency.cs:line 307
at Microtech.Infinity5.Web.Financial.GL.CurrencyForm.OnPreRenderComplete(EventArgs e) in d:\Work\Application\Microtech.Infinity5.Web\Financial\GL\CurrencyForm.aspx.cs:line 55
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Thanks,
asked
Sep 09 '15 at 10:01
ahmad emad
26●29●29●31
Hello ahmad emad
Could you give me 1)body of Currency.IsUsed() 2)DomainConfiguration.DefaultDatabase if you set it 3)DomainConfiguration.DefaultSchema 4)DomainConfiguration.MappingRules if you have some rules 5)configurations of nodes?
You can post it here or send me on alexey.kulakov@dataobjects.net