Re: [RDBO] update() nukes foreign key

2006-11-22 Thread rose
On Thu, 23 Nov 2006, John Siracusa wrote: > Try calling save() and not update(). Perfect, thanks! Guess my problem is that I have been using Class::DBI a lot and and update() in Class::DBI is the equivalent of save() in Rose. You should add a use Rose::DB::Object qw(:former_class_dbi_progr

Re: [RDBO] update() nukes foreign key

2006-11-22 Thread John Siracusa
On 11/22/06 9:51 PM, [EMAIL PROTECTED] wrote: > $found->[0]->name("otherproduct"); > $found->[0]->vendor({name => "othervendor"}); > $found->[0]->update(); > > > The problem doesn't occur if the line > > $found->[0]->vendor({name => "othervendor"}); > > gets taken out. If the da

[RDBO] update() nukes foreign key

2006-11-22 Thread rose
Hi there, I'm seeing the following behaviour with Rose::DB::Object 0.756: Here's a simple product/vendor relationship with the recommended MySQL tweaks: CREATE TABLE vendors ( id INTEGER PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255) ) Type=InnoDB; CREATE TABLE products (