This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I am using the NWIND model with defered deletion enabled. If I set the customer prop to another customer object for an already existing order where the customer has the order collection loaded, it causes the order to be marked deleted upon set. The code to recreate follows: Order tOrder = Repository.FindOne<Order>(new Guid("1c7cb768-812b-4416-ae2f-56a98cc61f21"));Customer tCustomer = Repository.FindOne<Customer>(new Guid("9e255276-cde4-4860-b76e-83f8394ba53f")); // To recreate the bug the Customer's orders must also be loaded. // Very common scenerio in an edit screen. foreach (Order ordX in tOrder.Customer.Orders) {Console.WriteLine("ordX.Id == " + ordX.Id.ToString()); } // This assert is fineDebug.Assert(tOrder.EntityState == EntityState.Default, "tOrder.EntityState == " + tOrder.EntityState.ToString()); // This line will cause the tOrder to be marked as deleted // The error is Set<TEntity> tOrder.Customer = tCustomer; // This assert will fail Debug.Assert(tOrder.EntityState == EntityState.Modified, "tOrder.EntityState == " + tOrder.EntityState.ToString()); I will also email repro project to your support box. Thanks again, Kavan |
|
|
Hi Kavan, Thanks for the repro, I'm currently looking into this issue. John-Daniel |
|
|
Hi John-Daniel, Any news on this issue? I planning an intial preview of my LS enabled app towards the end of next week. Performance with LS is truely second to none. Thanks again, Kavan |
|
|
Hi Kavan, Sorry for the delay. We've isolated the issue and are working through a resolution. As a work-around are you able to re-parent the entity by simply updating it's parent foreign key? Cheers, Andrew. |
|
|
Hi Kavan, This issue is resolved in tonight's build. Cheers, Andrew. |
|