Re: Copying a Class::Accessor class to a CDBI class (CDBI::Plugin::Temp)

[prev] [thread] [next] [Date index for 2005/05/25]

From: merlyn (Randal L. Schwartz)
Subject: Re: Copying a Class::Accessor class to a CDBI class (CDBI::Plugin::Temp)
Date: 11:48 on 25 May 2005
>>>>> "Christopher" == Christopher Laco <mendlefarg@xxxxx.xxx> writes:

Christopher> Hmmmm. What does "make it real" mean in this case?

Turn it from being a shadow only in memory into an actual database
object.

Christopher> In the original thred, I thought it was said that while
Christopher> construct() created the objects from data, CDBI still
Christopher> expected the data to already be in the database (aka it
Christopher> would update the record, not insert the record after any
Christopher> changes).

Well, I presume bad things would happen if autoupdate were on, and/or
you said ->update.  I'm not doing that.  I use it as a proxy for a
soon-to-be-created row, allowing some of my form-to-record-stuffing
routines to work with a stand-in until I'm ready to validate and
commit the final result.

Christopher> In the example above, is there no record in the db
Christopher> backing that construct() call, and does copy() make a
Christopher> completely new record in the database?

In my experience, correct.

        -- 
        Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@xxxxxxxxxx.xxx> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Re: Copying a Class::Accessor class to a CDBI class (CDBI::Plugin::Temp)
merlyn (Randal L. Schwartz) 11:48 on 25 May 2005

Generated at 15:51 on 25 May 2005 by mariachi v0.52