From 10ef46a5ec832133892867bedb0cf3097818dd58 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 16 Aug 2022 09:43:54 +1200 Subject: [PATCH] ENH Make DataObject::exists() an alias of DataObject::isInDB() (#10407) --- src/ORM/DataObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ORM/DataObject.php b/src/ORM/DataObject.php index b236b253c..b3669febb 100644 --- a/src/ORM/DataObject.php +++ b/src/ORM/DataObject.php @@ -849,7 +849,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity */ public function exists() { - return (isset($this->record['ID']) && $this->record['ID'] > 0); + return $this->isInDB(); } /**