[CDBI] TEMP columns not persisting through $self->add_to_<something>s

Berg, Eric eric.berg at lehman.com
Tue May 15 14:24:40 BST 2007

Ok.  Thanks.  In this case, when these Action objects get created, they
are really going to be used later when the actions are to be performed.
I think I'm going to take a crack at using Storable to drop files in
their Test directory so that I can thaw them later and run them.

Thanks for your help and insight, guys.


-----Original Message-----
From: matthewt at scsys.co.uk [mailto:matthewt at scsys.co.uk] On Behalf Of
Matt S Trout
Sent: Tuesday, May 15, 2007 3:59 AM
To: Perrin Harkins
Cc: Berg, Eric; classdbi at svr02.digitalcraftsmen.net
Subject: Re: [CDBI] TEMP columns not persisting through

On Mon, May 14, 2007 at 10:52:11PM -0400, Perrin Harkins wrote:
> On 5/14/07, Berg, Eric <eric.berg at lehman.com> wrote:
> >But basically, I call the method that does the add_to_actions(), and 
> >when I return from that method, the temp columns in the Action 
> >objects that I get with $test->actions have only the Primary column.
> Hmm, I think that's what I just said.  When you return from 
> load_action_defs(), unless you pass references to the objects you 
> created, they are gone forever, along with all their TEMP data.  When 
> you call actions(), it fetches fresh objects from the database, and of

> course they have no TEMP values.

A has_many relationship doesn't push the added value onto internal
storage - calling it results in a re-fetch from the DB so assuming the
original went out of scope you'll get a fresh object.

If you keep the original in scope -and- have the LOI on it might appear
to work, but I'd advise strongly against relying on that.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s) named above.  If you are not the intended recipient of this message you are hereby notified that any review, dissemination, distribution or copying of this message is strictly prohibited.  This communication is for information purposes only and should not be regarded as an offer to sell or as a solicitation of an offer to buy any financial product, an official confirmation of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  Therefore, we do not represent that this information is complete or accurate and it should not be relied upon as such.  All information is subject to change without notice.

IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this communication (including any attachments) is not intended or written to be used and cannot be used for the purpose of (i) avoiding U.S. tax related penalties or (ii) promoting, marketing or recommending to another party any transaction or matter addressed herein.

More information about the ClassDBI mailing list