snelg / cakephp-3-oracle

Oracle datasource for CakePHP 3.x
Apache License 2.0
11 stars 7 forks source link

Only get 1 result buts many expected #5

Closed Zehir closed 8 years ago

Zehir commented 8 years ago

With this request;

$dbResults = ConnectionManager::get('webconsult')
            ->newQuery()
            ->select([
                'field1',
                'field2',
                'field3'
            ])
            ->from('DB.TABLE')
            ->where([
                'field1 IN' => [
                    'a',
                    'b'
                ]
            ])
            ->execute()
            ->fetchAll('assoc');

This request generate this sql request:

SELECT field1, field2, field3 FROM DB.TABLE WHERE field1 in ('a','b')

But I only get the result for a and not for b

And if I do this;

$dbResults = ConnectionManager::get('webconsult')
            ->execute("SELECT field1, field2, field3 FROM DB.TABLE WHERE field1 in ('a','b')")
            ->fetchAll('assoc');

I get the 2 resutls. I try the same with a other table on mysql and the first syntax work

I missing something?

I using Cakephp 3.2.0-RC1 and this work on prev version

Zehir commented 8 years ago

Since I updated to cakephp 3.2.1 this work as expected.