Commit 79fc1e24e62890770ca015b2871f6a078b946609

Authored by Neil Blakey-Milner
1 parent 3eea231f

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 38 *
39 39 */
40 40 function create() {
41   - if ($this->iId < 0) {
  41 + if ($this->iId <= 0) {
42 42 $id = DBUtil::autoInsert($this->_table(), $this->_fieldValues());
43 43 if (PEAR::isError($id)) {
44 44 if ($this->_bUsePearError === false) {
... ...