Reputation: 136
I'm trying to do a filterBy
query in Propel with Criteria::XXXX
as a second argument. Like the example in the documentation:
$books = BookQuery::create()
->filterByTags(array('novel', 'russian'), Criteria::CONTAINS_ALL)
->find();
But this always fails giving me the error that the Class Criteria is not found.
Otherwise Propel works just fine. Anybody an idea how this could be fixed?
Upvotes: 1
Views: 1451
Reputation: 3621
For Propel 2 :
require_once __DIR__ . '/path_to/autoload.php';
use Propel\Runtime\ActiveQuery\Criteria;
Upvotes: 0