-
-
Save doctrinebot/04b179732418017473a7 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-433 - https://github.com/doctrine/doctrine2/issues/4933
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | |
=================================================================== | |
--- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (revision 7404) | |
+++ lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (working copy) | |
@@ -404,11 +404,25 @@ | |
/** | |
* Sets the change tracking policy used by this class. | |
* | |
- * @param integer $policy | |
+ * @param integer|string $policy | |
*/ | |
public function setChangeTrackingPolicy($policy) | |
{ | |
- $this->changeTrackingPolicy = $policy; | |
+ switch (strtoupper($policy)) | |
+ { | |
+ case "DEFERRED_IMPLICIT": | |
+ $this->changeTrackingPolicy = self::CHANGETRACKING_DEFERRED_IMPLICIT; | |
+ break; | |
+ case "DEFERRED_EXPLICIT": | |
+ $this->changeTrackingPolicy = self::CHANGETRACKING_DEFERRED_EXPLICIT; | |
+ break; | |
+ case "NOTIFY": | |
+ $this->changeTrackingPolicy = self::CHANGETRACKING_NOTIFY; | |
+ break; | |
+ default: | |
+ $this->changeTrackingPolicy = $policy; | |
+ break; | |
+ } | |
} | |
/** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment