propelorm / Propel

Current stable (and outdated and unmaintained) version of Propel - Please use v2 https://github.com/propelorm/Propel2 --
http://www.propelorm.org
MIT License
841 stars 417 forks source link

filterBySource() in findByArray() does not work for namespaced applications #201

Open alecksmart opened 12 years ago

alecksmart commented 12 years ago

Imagine

$this->recipient    = \Core\RecipientQuery::create()->findOneByName('xxx');        
$this->source       = \Core\SourceQuery::create()->findOneByName('yyy');

This works OK:

$count  = \Core\ContentRegistryEntryQuery::create()
            ->filterBySource($this->source)
            ->filterByRecipient($this->recipient)
            ->filterByToken('zzz')
                ->count();

This does not:

$count  = \Core\ContentRegistryEntryQuery::create()->findByArray(
            array(
                    'Source'    => $this->source,
                    'Recipient' => $this->recipient,
                    'Token'     => 'zzz',
                )
            )->count();

Error message:

filterBySource() only accepts arguments of type Source or PropelCollection
bmeynell commented 11 years ago

Was this ever solved?

staabm commented 11 years ago

the issue is still open, so I suppose not. maybe a unit test could prove it.