Fix ORMRow::insert() on PostgreSQL.
authorTim Landscheidt <tim@tim-landscheidt.de>
Fri, 28 Dec 2012 04:56:49 +0000 (04:56 +0000)
committeraude <aude.wiki@gmail.com>
Fri, 28 Dec 2012 22:00:06 +0000 (22:00 +0000)
commitad4ffa3fd59f40457464756c42adea7e245a14b5
tree482b47da068e857c8af313dfd83decf0a658083d
parent5925002158bee4632a00479d86f3cc0bea55f1f1
Fix ORMRow::insert() on PostgreSQL.

When inserting a new row, ORMRow explicitly passed NULL as the value for
the id field which in MySQL means "use next value in sequence", but in
PostgreSQL means "use NULL".  With this change, for id fields no value
is passed if it isn't set to non-null.  This fixes bug #43475.

This effectively bars the possibility to set the id field of an existing
row to NULL, but the current code already disallows any changes in id
fields.

Change-Id: I29d86fa6fc38ff1852821658e4927b4d7d4a72b6
includes/db/ORMRow.php