Skip to content

Commit

Permalink
Split out LIKE condition on objects, which is buggy in php74 (#1584)
Browse files Browse the repository at this point in the history
* Split out LIKE condition on objects, which is buggy in php74+sqlite

Co-authored-by: Brian Graham <Incognito@users.noreply.github.com>
  • Loading branch information
PhilinTv and Incognito authored Jun 25, 2020
1 parent 7263147 commit 9c35a36
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,26 @@ public function testColumnHydration()

public function testWhere()
{
$nb = \ComplexColumnTypeEntity10Query::create()
->where('ComplexColumnTypeEntity10.Bar LIKE ?', '%1234%')
->count();
$this->assertEquals(1, $nb, 'object columns are searchable by serialized object using where()');

$e = \ComplexColumnTypeEntity10Query::create()
->where('ComplexColumnTypeEntity10.Bar = ?', $this->c1)
->findOne();
$this->assertEquals($this->c1, $e->getBar(), 'object columns are searchable by object using where()');
}

/**
* Recover this undocumented functionality
*/
public function testWhereLike()
{
$this->markTestSkipped('There are inconsistencies regarding the handling of this statement on different platforms.');

$nb = \ComplexColumnTypeEntity10Query::create()
->where('ComplexColumnTypeEntity10.Bar LIKE ?', '%1234%')
->count();
$this->assertEquals(1, $nb, 'object columns are searchable by serialized object using where()');
}

public function testFilterByColumn()
{
$e = \ComplexColumnTypeEntity10Query::create()
Expand Down

0 comments on commit 9c35a36

Please sign in to comment.