What happens if in Doctrine2 I do the following with an entity manager.
$object = $em->find( 'MyModel\User', -999 );
Is object false, is it a User object, does an exception get thrown? Basically, how can I test if a row exists in the database based on some criteria?
From the Doctrine2 manual,
The return value is either the found entity instance or null if no instance could be found with the given identifier.
Doctrine Manual Entry