Skip Menu |

This queue is for tickets about the Rose-DBx-Object-Cached-FastMmap CPAN distribution.

Report information
The Basics
Id: 55900
Status: resolved
Priority: 0/
Queue: Rose-DBx-Object-Cached-FastMmap

People
Owner: Nobody in particular
Requestors: me [...] dbourget.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: (no value)



Subject: all fields marked as modified on remember()
inside remember(), this line results in all fields being flagged as changed when the object is restored from the cache: my $safe_obj = $self->__xrdbopriv_clone->__xrdbopriv_strip; That is, $safe_obj->{__xrdbopriv_modified_columns} flags all fields as changed. This appears to be a side effect of the clone() utility in the helpers package. It is appropriate for clone() to have this result. What is not appropriate is that objects fetched from the cache appear in need of being updated. On the contrary, they should appear not in need of being updated. A simple fix is to follow the above line with: $safe_obj->{__xrdbopriv_modified_columns} = {};
Subject: Re: [rt.cpan.org #55900] all fields marked as modified on remember()
Date: Fri, 9 Apr 2010 16:12:09 -0400
To: bug-Rose-DBx-Object-Cached-FastMmap [...] rt.cpan.org
From: Kevin McGrath <kmcgrath [...] baknet.com>
sorry for the long delay in getting back to you. I've been out of town a lot recently. I will take a look a this change and run it against the test. If everything looks good I'll get in a new version as soon as I can. Thanks, Kevin On Wed, Mar 24, 2010 at 11:18 AM, David Bourget via RT < bug-Rose-DBx-Object-Cached-FastMmap@rt.cpan.org> wrote: Show quoted text
> Wed Mar 24 11:18:27 2010: Request 55900 was acted upon. > Transaction: Ticket created by dbourget > Queue: Rose-DBx-Object-Cached-FastMmap > Subject: all fields marked as modified on remember() > Broken in: 0.04 > Severity: Normal > Owner: Nobody > Requestors: david.bourget@anu.edu.au > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=55900 > > > > inside remember(), this line results in all fields being flagged as > changed when the object is restored from the cache: > > my $safe_obj = $self->__xrdbopriv_clone->__xrdbopriv_strip; > > That is, $safe_obj->{__xrdbopriv_modified_columns} flags all fields as > changed. > > This appears to be a side effect of the clone() utility in the helpers > package. It is appropriate for clone() to have this result. What is not > appropriate is that objects fetched from the cache appear in need of > being updated. On the contrary, they should appear not in need of being > updated. > > A simple fix is to follow the above line with: > > $safe_obj->{__xrdbopriv_modified_columns} = {}; >
I am a terrible person. Just now uploading 0.05 that fixes this bug. Also updated the public repo to: https://github.com/kmcgrath/perl5-Rose-DBx-Object-Cached-FastMmap