Use temporary negative IDs for rows created in a draft Changeset

This commit is contained in:
2018-08-11 16:19:32 +02:00
parent 7938519a64
commit 8efc31d820
12 changed files with 193 additions and 72 deletions
+12 -2
View File
@@ -3,7 +3,9 @@
namespace App\Tables;
/**
* Sequential ID assigner
*/
abstract class BaseNumerator
{
/** @var int */
@@ -39,10 +41,18 @@ abstract class BaseNumerator
throw new \OutOfBoundsException("Column numerator has run out of allocated GCID slots");
$key = $this->getKey($this->next);
$this->next++;
$this->advance();
return $key;
}
/**
* Advance to the next ID
*/
protected function advance()
{
$this->next++;
}
/**
* Convert numeric index to a key
*