Bug in CslaActionExtender - AutoCloneOnUpdate

Bug in CslaActionExtender - AutoCloneOnUpdate

Old forum URL: forums.lhotka.net/forums/t/5535.aspx


detritus posted on Sunday, October 05, 2008

In OnClick method, down below the lines are:

if (Csla.ApplicationContext.AutoCloneOnUpdate == false)
  objectToSave = ((ICloneable)savableObject).Clone() as Csla.Core.ISavable;

Seems if clause should test the property with "true" not "false"

Sinan

sergeyb replied on Monday, October 06, 2008

I believe you are correct.  We will add this to the list of things to address.

Thank you.

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

Magenic ®

Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: detritus [mailto:cslanet@lhotka.net]
Sent: Sunday, October 05, 2008 1:24 PM
To: Sergey Barskiy
Subject: [CSLA .NET] Bug in CslaActionExtender - AutoCloneOnUpdate

 

In OnClick method, down below the lines are:

if (Csla.ApplicationContext.AutoCloneOnUpdate == false)
  objectToSave = ((ICloneable)savableObject).Clone() as Csla.Core.ISavable;

Seems if clause should test the property with "true" not "false"

Sinan



tiago replied on Sunday, September 09, 2012

detritus
In OnClick method, down below the lines are:

if (Csla.ApplicationContext.AutoCloneOnUpdate == false)
  objectToSave = ((ICloneable)savableObject).Clone() as Csla.Core.ISavable;

Seems if clause should test the property with "true" not "false"

Sinan

In fact that was correct. I was having some trouble to understand why to hand-clone the object when CSLA takes care of this for us. When

Csla.ApplicationContext.AutoCloneOnUpdate == false

CSLA doesn't take care of it and thus we must do it ourselves.

Copyright (c) Marimer LLC