Re: [transfer-dev] Dirty read problem

2010-08-17 Thread Jennifer Larkin
Are you cloning the object before you do the edit? http://www.dansshorts.com/post/managing-the-transfer-cache-with-clones On Tue, Aug 17, 2010 at 4:24 PM, pedrobl wrote: > > I'm having an issue where a user edits an object that does not get > validated, and then another user, in another computer

[transfer-dev] Re: Dirty read problem SOLVED

2010-08-17 Thread pedrobl
Hi! On Aug 18, 2:11 am, Bob Silverberg wrote: > An easier solution is to clone() your Transfer object before you populate it. > Then the dirty data never gets into the cache. Yeap. More elegant, too. Thanks for the quick response, Pedro. -- Before posting questions to the group please read:

Re: [transfer-dev] Re: Dirty read problem SOLVED

2010-08-17 Thread Bob Silverberg
An easier solution is to clone() your Transfer object before you populate it. Then the dirty data never gets into the cache. Sent from my iPhone On 2010-08-17, at 7:53 PM, pedrobl wrote: > > OK, after reading again the documentation on caching, I thought it'd > smart to discard the invalid o

[transfer-dev] Re: Dirty read problem SOLVED

2010-08-17 Thread pedrobl
OK, after reading again the documentation on caching, I thought it'd smart to discard the invalid object from the cache. Simple. It's probably in the documentation... but I'm fond of learning by making mistakes... very fond of, apparently, :) Pedro. -- Before posting questions to the group ple

[transfer-dev] Dirty read problem

2010-08-17 Thread pedrobl
I'm having an issue where a user edits an object that does not get validated, and then another user, in another computer, requests that object's data and receives the invalid data, with the isDirty flag set. It probably has to do with the cache, so just in case this is transfer cache configuratio

[transfer-dev] Re: empty string is persisted in field where nullable="false"

2010-08-17 Thread pedrobl
Hi Dennis, thanks for your help. On Aug 17, 11:17 pm, Dennis Clark wrote: > Null values in Transfer are covered in the wiki: > seehttp://docs.transfer-orm.com/wiki/Handling_Null_Values.cfm I had read the docs, but obviously didn't fully understand the consequences. > If you have nullable="true

Re: [transfer-dev] empty string is persisted in field where nullable="false"

2010-08-17 Thread Dennis Clark
Null values in Transfer are covered in the wiki: see http://docs.transfer-orm.com/wiki/Handling_Null_Values.cfm If you have nullable="true" for a property and you set the property to an empty string, the corresponding column will be set to NULL on save. When you read the column back, the property

[transfer-dev] Re: empty string is persisted in field where nullable="false"

2010-08-17 Thread pedrobl
An update. I added the following setter method: Now the object is loaded in a "dirty" state... but it is not persisted. The problem now is that a user who is just looking at the data while another is editing will see the Acr

[transfer-dev] empty string is persisted in field where nullable="false"

2010-08-17 Thread pedrobl
Hi! I tried searching in the forums for this issue, but could not find anything relevant. I thought having nullable="false" in a property would prevent a null from being inserted in the database. To test it I tried to submit an empty textbox to that field and to my surprise, an empty string, lite