Re: [RDBO] Problem using primary key generator

2008-01-24 Thread Bianka Martinovic
Hallo, I think I've 'managed' this now. ;) Digging this mailing list again (and again...), I've found the hint to place a function in the ::Manager that does what I need. So, I added a function to the ::Manager of my 'central table' that loads all the data from all related tables. This way, I can

Re: [RDBO] Problem using primary key generator

2008-01-22 Thread Bianka Martinovic
John Siracusa <[EMAIL PROTECTED]> writes: > Is NICADDRESS the primary key of whatever class/table the CMP_NETWORK > relationship points to? Hello John. Thank you very much for your help. :) No. The primary key is named NETWORKID. I have found that the problem is using $row->...->load() and the

Re: [RDBO] Problem using primary key generator

2008-01-21 Thread John Siracusa
On Jan 21, 2008 8:49 AM, Bianka Martinovic <[EMAIL PROTECTED]> wrote: > When I look at the load()ed data, all seems fine. But later on, after > > $row->init( %$data ); > > where $data contains something like > > { > 'CMP_NETWORK' => { > 'NICADDRESS' => 'a01010101011' > }, >

Re: [RDBO] Problem using primary key generator

2008-01-21 Thread Bianka Martinovic
Hello again, I have now added a foreach() construct that iterates over the data, setting the changes in the related object using the Manager. Now, using $row->save(cascade=>1) works as expected. The problem is, this only works for one sublevel, or I must implement a recursive function. I'm pretty

Re: [RDBO] Problem using primary key generator

2008-01-21 Thread Bianka Martinovic
John Siracusa <[EMAIL PROTECTED]> writes: > The primary key generator will only be called when attempting to > insert() an object that has an undef value in one or more of its > primary key columns. Hello John, thank you for your response. :) I load() the row of the "basic table" using 'with'

Re: [RDBO] Problem using primary key generator

2008-01-18 Thread John Siracusa
On Jan 16, 2008 11:40 AM, Bianka Martinovic <[EMAIL PROTECTED]> wrote: > my $row = $schema->new( > db => $dbh, > %{ > $self->_prepare_data( $schema, { $self- > >tableset( 'idfield' ) => $attrs{'dn'} } ) >

[RDBO] Problem using primary key generator

2008-01-18 Thread Bianka.Martinovic
Hello, I have a problem using default_primary_key_generator. I'm new to RDBO, so please be clement. ;o) It' really complex and so not easy to learn. (Well, for me.) I am writing a "generic" application for data synchronisation. The sync script itself does not "know" anything about the underlying