From 3120e71d44a272228c0393bfe8be3d4653f2cd82 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 26 Aug 2006 05:10:38 +0000 Subject: Bug 349349: Use ->create from Bugzilla::Object instead of insert_new_user for Bugzilla::User Patch By Max Kanat-Alexander r=LpSolit, a=myk --- Bugzilla/Object.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Object.pm') diff --git a/Bugzilla/Object.pm b/Bugzilla/Object.pm index fa6c4e9cb..219658a92 100644 --- a/Bugzilla/Object.pm +++ b/Bugzilla/Object.pm @@ -153,7 +153,7 @@ sub create { chop($qmarks); $dbh->do("INSERT INTO $table (" . join(', ', @field_names) . ") VALUES ($qmarks)", undef, @values); - my $id = $dbh->bz_last_key($table, 'id'); + my $id = $dbh->bz_last_key($table, $class->ID_FIELD); return $class->new($id); } @@ -303,7 +303,7 @@ Params: C<$params> - hashref - A value to put in each database Returns: The Object just created in the database. Notes: In order for this function to work in your subclass, - your subclass's C field must be of C + your subclass's L must be of C type in the database. Your subclass also must define L and L. -- cgit v1.2.3-24-g4f1b