Permalink
Browse files

Allow null in ClassMetadataInfo::setSlaveOkay() to revert to default

  • Loading branch information...
1 parent 09730b7 commit bd6bcc0ac228d45e20809adf4cb1a58603b53900 @jmikola jmikola committed Jan 21, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataInfo.php
@@ -697,13 +697,13 @@ public function setDiscriminatorValue($value)
}
/**
- * Sets whether or not reads for this class are okay to read from a slave.
+ * Sets the slaveOkay option applied to collections for this class.
*
- * @param boolean $slaveOkay
+ * @param boolean|null $slaveOkay
*/
public function setSlaveOkay($slaveOkay)
{
- $this->slaveOkay = (boolean) $slaveOkay;
+ $this->slaveOkay = $slaveOkay === null ? null : (boolean) $slaveOkay;
}
/**

0 comments on commit bd6bcc0

Please sign in to comment.