-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Description
PostgreSQL definiton:
some_id bigint NOT NULL DEFAULT nextval('seq_some_id'::regclass),Flourish column's info:
Array (
[type] => integer
[min_value] => fNumber Object
(
[scale:fNumber:private] => 0
[value:fNumber:private] => -9223372036854775808
)
[max_value] => fNumber Object
(
[scale:fNumber:private] => 0
[value:fNumber:private] => +9223372036854775807
)
[auto_increment] => 1
[not_null] => 1
[comment] =>
[placeholder] => %i
[default] =>
[valid_values] =>
[max_length] =>
[decimal_places] =>
)
As you can see default is not set https://github.com/flourishlib/flourish-classes/blob/master/fSchema.php#L1758.
fActiveDirectory::populate sets auto increment field to 0 (note: this field is not in request, of'course). This prevents fActiveDirectory::store to success on insert new row., 'cause it doesn't meet condition value === NULL
As flourish is deprecated library and it is abandoned, I won't provide PR - it wouldn't be merged. Simple workaround replace line:
if ($schema->getColumnInfo($table, $column, 'auto_increment') && $schema->getColumnInfo($table, $column, 'not_null') && $this->values[$column] === NULL) {with:
if ($schema->getColumnInfo($table, $column, 'auto_increment') && $schema->getColumnInfo($table, $column, 'not_null') && !$this->values[$column]) {Metadata
Metadata
Assignees
Labels
No labels