Permalink
Browse files

Forgot the fixes

  • Loading branch information...
1 parent 2ef364e commit 46061fe94c318c8c467a799808298bb00df4cd2d @rivaros rivaros committed May 3, 2012
Showing with 24 additions and 0 deletions.
  1. +11 −0 lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php
  2. +13 −0 lib/Doctrine/DBAL/Types/GuidType.php
@@ -620,6 +620,17 @@ public function getSmallIntTypeDeclarationSQL(array $field)
}
/**
+ * Decleration for a UNIQUEIDENTIFIER (GUID) field in SQL Server
+ *
+ * @param array $field
+ * @return string
+ */
+ public function getGuidTypeDeclartionSQL(array $field)
+ {
+ return 'UUID';
+ }
+
+ /**
* @override
*/
public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration)
@@ -38,5 +38,18 @@ public function getName()
{
return Type::GUID;
}
+
+ /**
+ * Converts a value from its database representation to its PHP representation
+ * of this type.
+ *
+ * @param mixed $value The value to convert.
+ * @param AbstractPlatform $platform The currently used database platform.
+ * @return mixed The PHP representation of the value.
+ */
+ public function convertToPHPValue($value, AbstractPlatform $platform)
+ {
+ return (null === $value) ? null : str_replace("-","", $value);
+ }
}

0 comments on commit 46061fe

Please sign in to comment.