I know this is old, but provided solutions are not correct for Doctrine 1.2.x
When you use functions like:
Doctrine::getTable('YourClass')->findByDeleted_at(null); //he want to get NOT DELETED rows!
Doctrine throws an error that: "You must specify the value to findBy", because null is threaten as no passed value;
->findBy('deleted_at', null)
throws an exception too.
->findBy('deleted_at','NULL')
is either not correct becouse it is translated to SQL: ... WHERE deleted_at = 'NULL'
;
SQL syntax for such query should look like:
... WHERE deleted_at IS NULL;
So the solution is to use ->findBySql()
method:
Doctrine::getTable('YourClass')->findBySql('deleted_at IS NULL', array());
* third argument could be a Hydration_Mode.
Hope that will help someone...