var doc = Query.All<FilterEntity>().Where(f => f.Integer == 1).Prefetch(s => s.ItemGroup).Single();
doc.ItemGroup.Add(new AnotherEntity(Guid.NewGuid()));
doc.ItemGroup.Add(new AnotherEntity(Guid.NewGuid()));
doc.ItemGroup.Add(new AnotherEntity(Guid.NewGuid()));

The result on the screenshot


Updated at 02.04.2010 12:18:52

Xtensive.Storage.DLL!Xtensive.Storage.Operations.EntityCreateOperation.EntityCreateOperation(Xtensive.Storage.Key key = {AnotherEntity, (edab92cf-76c5-4f22-bd16-37c3d5b14835)}) Line 46 C# Xtensive.Storage.DLL!Xtensive.Storage.Entity.SystemBeforeInitialize(bool materialize = false) Line 436 + 0x38 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Entity.Entity(object[] values = {object[1]}) Line 674 + 0xa bytes C# Core.Data.Models.DLL!Core.Data.Models.Base.EntityBase.EntityBase(System.Guid id = {edab92cf-76c5-4f22-bd16-37c3d5b14835}) Line 32 + 0x59 bytes C# Core.Data.Tests.DLL!Core.Data.Tests.AnotherEntity.AnotherEntity(System.Guid id = {edab92cf-76c5-4f22-bd16-37c3d5b14835}) Line 14 + 0x17 bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.SomeOp(Core.Data.Tests.FilterEntity doc = {FilterEntity, (f6a09e85-ff98-4edd-8a30-32010f8c28b4)}) Line 134 + 0x47 bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.SomeMethod() Line 122 + 0xb bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.DsTest() Line 76 + 0x8 bytes C# [External Code] JetBrains.ReSharper.UnitTestRunner.nUnit.dll!JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestRunner.Run(NUnit.Core.EventListener listener = {JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitListener}, NUnit.Core.ITestFilter filter = {JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestFilter}) Line 11 + 0x1a bytes C# [External Code] JetBrains.ReSharper.TaskRunnerFramework.dll!JetBrains.ReSharper.TaskRunnerFramework.CurrentAppDomainHost.ExecuteNodes.AnonymousMethod() Line 87 + 0x11 bytes C# [External Code]

The constructor is called only once per entity.


Updated at 02.04.2010 12:48:34

2 calls to .Log() have been done:

Xtensive.Storage.DLL!Xtensive.Storage.OperationLog.Log(Xtensive.Storage.IOperation operation = Description = "Create entity, Key = AnotherEntity, (cbc68e46-70bd-4d23-a815-a48091400c85)") Line 34 C# Xtensive.Storage.DLL!Xtensive.Storage.Operations.OperationCapturer.OperationCompleted(object sender = FullName = "Default, #3", Xtensive.Storage.Operations.OperationEventArgs e = {Xtensive.Storage.Operations.OperationEventArgs}) Line 32 + 0x24 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Session.NotifyOperationCompleted(Xtensive.Storage.IOperation operation = Description = "Create entity, Key = AnotherEntity, (cbc68e46-70bd-4d23-a815-a48091400c85)") Line 329 + 0x35 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Operations.OperationContext.System.IDisposable.Dispose() Line 88 + 0x10 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Entity.SystemBeforeInitialize(bool materialize = false) Line 439 + 0x33 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Entity.Entity(object[] values = {object[1]}) Line 674 + 0xa bytes C# Core.Data.Models.DLL!Core.Data.Models.Base.EntityBase.EntityBase(System.Guid id = {cbc68e46-70bd-4d23-a815-a48091400c85}) Line 32 + 0x59 bytes C# Core.Data.Tests.DLL!Core.Data.Tests.AnotherEntity.AnotherEntity(System.Guid id = {cbc68e46-70bd-4d23-a815-a48091400c85}) Line 14 + 0x17 bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.SomeOp(Core.Data.Tests.FilterEntity doc = {FilterEntity, (468b0de9-faa2-4fba-acf0-89acb6c50763)}) Line 134 + 0x47 bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.SomeMethod() Line 122 + 0xb bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.DsTest() Line 76 + 0x8 bytes C# [External Code] JetBrains.ReSharper.UnitTestRunner.nUnit.dll!JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestRunner.Run(NUnit.Core.EventListener listener = {JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitListener}, NUnit.Core.ITestFilter filter = {JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestFilter}) Line 11 + 0x1a bytes C# [External Code] JetBrains.ReSharper.TaskRunnerFramework.dll!JetBrains.ReSharper.TaskRunnerFramework.CurrentAppDomainHost.ExecuteNodes.AnonymousMethod() Line 87 + 0x11 bytes C# [External Code]

Xtensive.Storage.DLL!Xtensive.Storage.OperationLog.Log(Xtensive.Storage.IOperation operation = Description = "Create entity, Key = AnotherEntity, (cbc68e46-70bd-4d23-a815-a48091400c85)") Line 34 C# Xtensive.Storage.DLL!Xtensive.Storage.Operations.OperationCapturer.OperationCompleted(object sender = FullName = "Default, #3", Xtensive.Storage.Operations.OperationEventArgs e = {Xtensive.Storage.Operations.OperationEventArgs}) Line 32 + 0x24 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Session.NotifyOperationCompleted(Xtensive.Storage.IOperation operation = Description = "Create entity, Key = AnotherEntity, (cbc68e46-70bd-4d23-a815-a48091400c85)") Line 329 + 0x35 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Operations.OperationContext.System.IDisposable.Dispose() Line 88 + 0x10 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Entity.SystemBeforeInitialize(bool materialize = false) Line 439 + 0x33 bytes C# Xtensive.Storage.DLL!Xtensive.Storage.Entity.Entity(object[] values = {object[1]}) Line 674 + 0xa bytes C# Core.Data.Models.DLL!Core.Data.Models.Base.EntityBase.EntityBase(System.Guid id = {cbc68e46-70bd-4d23-a815-a48091400c85}) Line 32 + 0x59 bytes C# Core.Data.Tests.DLL!Core.Data.Tests.AnotherEntity.AnotherEntity(System.Guid id = {cbc68e46-70bd-4d23-a815-a48091400c85}) Line 14 + 0x17 bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.SomeOp(Core.Data.Tests.FilterEntity doc = {FilterEntity, (468b0de9-faa2-4fba-acf0-89acb6c50763)}) Line 134 + 0x47 bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.SomeMethod() Line 122 + 0xb bytes C# Core.Tests.DLL!Core.Tests.MembershipTest.DsTest() Line 76 + 0x8 bytes C# [External Code] JetBrains.ReSharper.UnitTestRunner.nUnit.dll!JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestRunner.Run(NUnit.Core.EventListener listener = {JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitListener}, NUnit.Core.ITestFilter filter = {JetBrains.ReSharper.UnitTestRunner.nUnit.NUnitTestFilter}) Line 11 + 0x1a bytes C# [External Code] JetBrains.ReSharper.TaskRunnerFramework.dll!JetBrains.ReSharper.TaskRunnerFramework.CurrentAppDomainHost.ExecuteNodes.AnonymousMethod() Line 87 + 0x11 bytes C# [External Code]

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Apr 02 '10 at 10:52

xumix's gravatar image

xumix
425757682

Can you publish stack traces for duplicate EntityCreateOperation constructor calls by putting a breakpoint into constructor?

We'll try to resolve the issue ASAP, and this information would be quite helpful.

(Apr 02 '10 at 10:52) Alex Yakunin Alex%20Yakunin's gravatar image

One Answer:

Hmm, can you check the actual operation type - may be there is a bug in .ToString() text?

Alternatively, you can put a breakpoint to OperationLog.Log method to trace this: http://goo.gl/CtR2

answered Apr 02 '10 at 12:26

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

BTW all operation are made in DisconnectedState. If you need the full source code I can provide it.

(Apr 02 '10 at 12:26) xumix xumix's gravatar image

This would help a lot. You can send it to me by e-mail or Skype.

(Apr 02 '10 at 12:26) Alex Yakunin Alex%20Yakunin's gravatar image

I've send you code for this and other bugs. PoC for this bug is located in > public void DsTest() in MembershipTests

(Apr 02 '10 at 12:26) xumix xumix's gravatar image

To be checked tomorrow.

(Apr 02 '10 at 12:26) Alex Yakunin Alex%20Yakunin's gravatar image

The issue is finally fixed. Some details are here: viewtopic.php?f=29&t=5954#p14966

(Apr 02 '10 at 12:26) Alex Yakunin Alex%20Yakunin'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

Subscription:

Once you sign in you will be able to subscribe for any updates here

Tags:

×574

Asked: Apr 02 '10 at 10:52

Seen: 2,848 times

Last updated: Apr 02 '10 at 10:52

powered by OSQA