IsDirty is always true

IsDirty is always true

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


Cosmin posted on Tuesday, December 09, 2008


Dim account = CustomerAccount.NewCustomerAccount()
account.IsAccountValid = True
account.Name = AccountName
account.URL = AccountURL

Dim savedAccount = account.Save()
Assert.IsTrue(savedAccount.AccountId > 0)
Assert.IsFalse(savedAccount.IsDirty)  ' this fails the test

account.AccountId is 0 before save and the actual identity number after save. I suppose that is ok as I run a local DataPortal and it wouldn't be the case if I ran the remoting portal.

Why is the savedAccount dirty? Is it me or there is a bug in there?

I'm using version 3.0.4.

Cosmin replied on Tuesday, December 09, 2008


Sorry, my mistake. I have a child object in the account that was not properly saved.


Copyright (c) Marimer LLC