diff options
author | mkanat%bugzilla.org <> | 2006-08-26 05:10:38 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-08-26 05:10:38 +0000 |
commit | 3120e71d44a272228c0393bfe8be3d4653f2cd82 (patch) | |
tree | a867f3d272e48f1aec5dbbef3d530e5f4cd80ae7 /Bugzilla/Object.pm | |
parent | 3f868ed5858dec2b8523c2997c2ebbb2f379cc7a (diff) | |
download | bugs-3120e71d44a272228c0393bfe8be3d4653f2cd82.tar bugs-3120e71d44a272228c0393bfe8be3d4653f2cd82.tar.gz bugs-3120e71d44a272228c0393bfe8be3d4653f2cd82.tar.bz2 bugs-3120e71d44a272228c0393bfe8be3d4653f2cd82.tar.xz bugs-3120e71d44a272228c0393bfe8be3d4653f2cd82.zip |
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.pm | 4 |
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>. |