Re: Question about creation of records on many tables

[prev] [thread] [next] [Date index for 2004/09/22]

From: Tony Bowden
Subject: Re: Question about creation of records on many tables
Date: 10:17 on 22 Sep 2004
On Wed, Sep 22, 2004 at 12:05:27PM +0200, Andreas Fromm wrote:
> Is it possible to set the CDBI-classes in such a way the if I pass a
> hash containing the data for a new user with adress 
> I get the correct behavior that the adress-record is created first and
> the id is used in the user-record, all by itself, or do I have to take
> care to create the address-record first?

You have to do it yourself in two stages. You could provide your own
create() method that DTRT, however.

If you can generalise this enough, I'm sure it could be rolled back into
the code.

Tony

Question about creation of records on many tables
Andreas Fromm 10:05 on 22 Sep 2004

Re: Question about creation of records on many tables
Tony Bowden 10:17 on 22 Sep 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52