From d2961c585e06c779c87ca4fa014cb61c57f734a8 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Fri, 6 Jun 2014 09:50:57 +0000 Subject: [PATCH] #926 JSON/REST Delete: nasty report SVN:trunk[3200] --- core/dbobject.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 2bd689199..50358fb3b 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -1885,7 +1885,8 @@ abstract class DBObject implements iDisplay $this->AfterDelete(); $this->m_bIsInDB = false; - $this->m_iKey = null; + // Fix for #926: do NOT reset m_iKey as it can be used to have it for reporting purposes (see the REST service to delete objects, reported as bug #926) + // Thought the key is not reset, using DBInsert or DBWrite will create an object having the same characteristics and a new ID. DBUpdate is protected } }