dblayeroo: if the primary key is defined, the unique are not mandatory

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3563 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-03 07:59:47 +00:00
parent 0d63ce1e34
commit 790fe6b703

View File

@@ -1882,10 +1882,10 @@ class dblayeroo
if ($this->table === null)
$this->DBException (dgettext ("domframework",
"No table name defined to insert in the table"));
if ($this->unique === null)
if ($this->unique === null && $this->primary === null)
$this->DBException (dgettext ("domframework",
"Unique fields of table are not defined"));
if (! is_array ($this->unique))
if (! is_array ($this->unique) && $this->unique !== null)
$this->DBException (dgettext ("domframework",
"The unique configuration is not an array"));
switch ($this->command)