Re: construct + autoupdate(0)

[prev] [thread] [next] [Date index for 2005/06/22]

From: Bill Moseley
Subject: Re: construct + autoupdate(0)
Date: 00:39 on 22 Jun 2005
On Fri, May 13, 2005 at 08:31:05AM +0100, Tony Bowden wrote:
> On Thu, May 12, 2005 at 11:22:58PM -0400, Perrin Harkins wrote:
> > > What I need to do is to pass some data to construct() to get the
> > > desired objects, but I don't want any record to exist in the database
> > > until I do more futxing and then call update().
> > You can't currently do that with Class::DBI.  Make another object using
> > Class::Accessor, and copy it into a Class::DBI object when you want to
> > save it to the database.
> 
> Oooh. That's a nice idea.
> 
> We should really have a test for that, if it's to become the "official"
> way to do this, as I suspect it may otherwise suddenly stop working at
> some point when I do more deep magic underneath the objects....

Which idea?  And I assume "official" is not for 1.00, right?

I too would like to do something like:

   my $person = Person->construct;
   $person->name('foo');
   $person->age(30);
   $person->create;  # Sequence creates primary key


        -- 
        Bill Moseley
moseley@xxxx.xxx

construct + autoupdate(0)
Christopher Laco 00:53 on 13 May 2005

Re: construct + autoupdate(0)
Perrin Harkins 03:22 on 13 May 2005

Re: construct + autoupdate(0)
Tony Bowden 07:31 on 13 May 2005

Re: construct + autoupdate(0)
Bill Moseley 00:39 on 22 Jun 2005

Re: construct + autoupdate(0)
Joss Shaw 08:33 on 13 May 2005

Generated at 16:36 on 28 Jul 2005 by mariachi v0.52