Fixing problem when id is not set in find. This also resolve problem wit... #57

Merged
merged 1 commit into from Apr 11, 2012
Jump to file or symbol
Failed to load files and symbols.
+4 −0
Split
View
@@ -138,6 +138,10 @@ public function delete($object)
*/
public function find($class, $id)
{
+ if ( !isset($id) ) {
+ return null;
+ }
@rande

rande Apr 11, 2012

Owner

a line break here ;)

@chrux

chrux Apr 11, 2012

Contributor

Sure! Done! :)

+
$values = array_combine($this->getIdentifierFieldNames($class), explode(self::ID_SEPARATOR, $id));
return $this->getEntityManager($class)->getRepository($class)->find($values);
}