From 2100b9aebfaa28926215126048ab7603db5f7165 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Thu, 13 Oct 2022 07:27:45 +0000 Subject: [PATCH] [REF][PHP8.1] Fix test failure on civiimport unit test because sequence key and keys are using id not _id Additional patches from Eileen --- ext/civiimport/Civi/BAO/Import.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/ext/civiimport/Civi/BAO/Import.php b/ext/civiimport/Civi/BAO/Import.php index bc807c23c1..b8ab6edef4 100644 --- a/ext/civiimport/Civi/BAO/Import.php +++ b/ext/civiimport/Civi/BAO/Import.php @@ -251,4 +251,24 @@ class Import extends CRM_Core_DAO { return array_merge(self::getFieldsForTable($tableName), self::getSupportedFields()); } + /** + * Defines the default key as 'id'. + * + * @return array + */ + public function keys() { + return ['_id']; + } + + /** + * Tells DB_DataObject which keys use autoincrement. + * 'id' is autoincrementing by default. + * + * + * @return array + */ + public function sequenceKey() { + return ['_id', TRUE]; + } + } -- 2.25.1