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

Perrin Harkins perrin at elem.com
Mon Oct 24 20:54:08 BST 2005

On Mon, 2005-10-24 at 15:47 -0400, Edward J. Sabol wrote:
> I'll add the following possibilties to Perrin's list:
> 5. You're forgetting to call the update() method after you change the value
>    via its mutator.
> 6. You're correctly calling update(), but you're using Oracle or PostgreSQL
>    (both of which default to AutoCommit off) or have set AutoCommit to be off
>    in some other fashion, and you're forgetting to call dbi_commit().
> 7. You're correctly calling update() and dbi_commit(), but you overrode the
>    db_Main() method and forgot to call __PACKAGE__->_remember_handle('Main')
>    so that dbi_commit() will actually work.

All good guesses, but none of them apply here.  If you load an object of
the same class with the same primary key twice, both references should
point to the same object, so you should see changes in both places with
no update() calls needed.

- Perrin

More information about the ClassDBI mailing list