Merge pull request #19326 from owncloud/issue-19314-querybuilder-set-null
Allow `set('column', 'null')` to work like in Doctrine's QueryBuilder
This commit is contained in:
commit
11974477bd
2 changed files with 5 additions and 1 deletions
|
@ -52,7 +52,7 @@ class QuoteHelper {
|
|||
return (string) $string;
|
||||
}
|
||||
|
||||
if ($string === null || $string === '*') {
|
||||
if ($string === null || $string === 'null' || $string === '*') {
|
||||
return $string;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,10 @@ class QuoteHelperTest extends \Test\TestCase {
|
|||
[new Literal('literal'), 'literal'],
|
||||
[new Literal(1), '1'],
|
||||
[new Parameter(':param'), ':param'],
|
||||
|
||||
// (string) 'null' is Doctrines way to set columns to null
|
||||
// See https://github.com/owncloud/core/issues/19314
|
||||
['null', 'null'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue