[CDBI] Re: uniqueness of objects in memory??

Bill Moseley moseley at hank.org
Mon Oct 24 21:46:37 BST 2005


On Mon, Oct 24, 2005 at 01:31:44PM -0700, Phil Mitchell wrote:
> [% prefs.home_page %]
> [% user.prefs.home_page %]
> 
> and they're different.

Can you demonstrate with just your model?  Something like:


> 1. User has_a Prefs object; User->Prefs->home_page equals X

    my $user = User->retrieve(1);
    print "start home page ", $user->Prefs->home_page;

> 2. Prefs gets updated with new data; Prefs->home_page equals Y

    my $prefs = $user->Prefs;
    $prefs->home_page('Y');
    $prefs->update;
    print "From Prefs: ", $prefs->home_page;


> 3. But User->Prefs->home_page still equals X.

    print "From user: ", $user->Prefs->home_page;

-- 
Bill Moseley
moseley at hank.org





More information about the ClassDBI mailing list