Commit 74aa5c92dacb73869d5fbbf856e42c9b2fb606b2
1 parent
edd6e2b8
We consider the value '0' for iId to mean that we never got the value
from the database, and that we can thus use create to create the entity in the database. git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4107 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
1 additions
and
1 deletions
lib/ktentity.inc
| @@ -38,7 +38,7 @@ class KTEntity { | @@ -38,7 +38,7 @@ class KTEntity { | ||
| 38 | * | 38 | * |
| 39 | */ | 39 | */ |
| 40 | function create() { | 40 | function create() { |
| 41 | - if ($this->iId < 0) { | 41 | + if ($this->iId <= 0) { |
| 42 | $id = DBUtil::autoInsert($this->_table(), $this->_fieldValues()); | 42 | $id = DBUtil::autoInsert($this->_table(), $this->_fieldValues()); |
| 43 | if (PEAR::isError($id)) { | 43 | if (PEAR::isError($id)) { |
| 44 | if ($this->_bUsePearError === false) { | 44 | if ($this->_bUsePearError === false) { |