Propel icon indicating copy to clipboard operation
Propel copied to clipboard

Issues with select() in 1.6.9 on Oracle

Open romangetman opened this issue 13 years ago • 3 comments

Having issues with the following code:

$feed_items = ArticleQuery::create()
            ->select(['Id','Hot','Published'])
            ->filterByPublished(1)
            ->limit(100)
            ->find()
            ->toArray();

What I get is: Notice: Undefined offset: 3 in vendor/propel/propel1/runtime/lib/formatter/PropelSimpleArrayFormatter.php line 72

I've also tried toKeyValue() instead of toArray() and got similar error messages.

Did I miss something in the docs or is this a bug? I'm running OS X php 5.4 Using Oracle with pdo_oci

romangetman avatar Nov 21 '13 22:11 romangetman

In PropelSimpleArrayFormatter::getStructuredArrayFromRow($row) the $row array is always longer than $columnNames by 1 element. I haven't figured out exactly where the value comes from, but in my case it's a 1.

romangetman avatar Nov 22 '13 13:11 romangetman

Could you please provide a failing testcase?

staabm avatar Nov 22 '13 14:11 staabm

I've updated to the latest stable and the issue also applies to 1.7.0 I'll try to run tests asap and provide the results.

romangetman avatar Nov 22 '13 19:11 romangetman