summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Object.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2006-08-26 07:10:38 +0200
committermkanat%bugzilla.org <>2006-08-26 07:10:38 +0200
commit3120e71d44a272228c0393bfe8be3d4653f2cd82 (patch)
treea867f3d272e48f1aec5dbbef3d530e5f4cd80ae7 /Bugzilla/Object.pm
parent3f868ed5858dec2b8523c2997c2ebbb2f379cc7a (diff)
downloadbugzilla-3120e71d44a272228c0393bfe8be3d4653f2cd82.tar.gz
bugzilla-3120e71d44a272228c0393bfe8be3d4653f2cd82.tar.xz
Bug 349349: Use ->create from Bugzilla::Object instead of insert_new_user for Bugzilla::User
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=myk
Diffstat (limited to 'Bugzilla/Object.pm')
-rw-r--r--Bugzilla/Object.pm4
1 files changed, 2 insertions, 2 deletions
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<id> field must be of C<SERIAL>
+ your subclass's L</ID_FIELD> must be of C<SERIAL>
type in the database. Your subclass also must
define L</REQUIRED_CREATE_FIELDS> and L</VALIDATORS>.