Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change XML and YML Indexing

  • Loading branch information...
commit 3200093180be9051f279e60993c242208404c160 1 parent 12750a7
@beberlei beberlei authored
View
5 UPGRADE
@@ -23,6 +23,11 @@ to:
private $username;
}
+Changed XML and YAML Indexing Attribute
+---------------------------------------
+
+The attribute for indexing classes or properties in XML and YAML was renamed from "indexed" to "index".
+
Upgrade from Alpha 1 to Alpha2
==============================
View
4 lib/Doctrine/ODM/CouchDB/Mapping/Driver/XmlDriver.php
@@ -68,7 +68,7 @@ public function loadMetadataForClass($className, ClassMetadata $class)
$class->mapField(array(
'fieldName' => (string)$fieldMapping['name'],
'jsonName' => (isset($fieldMapping['json-name'])) ? (string)$fieldMapping['json-name'] : null,
- 'indexed' => (isset($fieldMapping['indexed'])) ? (bool)$fieldMapping['indexed'] : false,
+ 'indexed' => (isset($fieldMapping['index'])) ? (bool)$fieldMapping['index'] : false,
'type' => (isset($fieldMapping['type'])) ? (string)$fieldMapping['type'] : null,
'isVersionField' => (isset($fieldMapping['version'])) ? true : null,
));
@@ -79,7 +79,7 @@ public function loadMetadataForClass($className, ClassMetadata $class)
foreach ($xmlRoot->id as $idElement) {
$class->mapField(array(
'fieldName' => (string)$idElement['name'],
- 'indexed' => (isset($idElement['indexed'])) ? (bool)$idElement['indexed'] : false,
+ 'indexed' => (isset($idElement['index'])) ? (bool)$idElement['index'] : false,
'type' => (isset($idElement['type'])) ? (string)$idElement['type'] : null,
'id' => true,
'strategy' => (isset($idElement['strategy'])) ? (string)$idElement['strategy'] : null,
View
4 lib/Doctrine/ODM/CouchDB/Mapping/Driver/YamlDriver.php
@@ -64,7 +64,7 @@ public function loadMetadataForClass($className, ClassMetadata $class)
foreach ($element['id'] AS $fieldName => $idElement) {
$class->mapField(array(
'fieldName' => $fieldName,
- 'indexed' => (isset($idElement['indexed'])) ? (bool)$idElement['indexed'] : false,
+ 'indexed' => (isset($idElement['index'])) ? (bool)$idElement['index'] : false,
'type' => (isset($idElement['type'])) ? $idElement['type'] : null,
'id' => true,
'strategy' => (isset($idElement['strategy'])) ? $idElement['strategy'] : null,
@@ -77,7 +77,7 @@ public function loadMetadataForClass($className, ClassMetadata $class)
$class->mapField(array(
'fieldName' => $fieldName,
'jsonName' => (isset($fieldElement['jsonName'])) ? $fieldElement['jsonName'] : null,
- 'indexed' => (isset($fieldElement['indexed'])) ? (bool)$fieldElement['indexed'] : false,
+ 'indexed' => (isset($fieldElement['index'])) ? (bool)$fieldElement['index'] : false,
'type' => (isset($fieldElement['type'])) ? $fieldElement['type'] : null,
'isVersionField' => (isset($fieldElement['version'])) ? true : null,
));
View
8 tests/Doctrine/Tests/ODM/CouchDB/Mapping/xml/Doctrine.Tests.Models.CMS.CmsUser.dcm.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping>
- <document name="Doctrine\Tests\Models\CMS\CmsUser">
+ <document name="Doctrine\Tests\Models\CMS\CmsUser" index="true">
<id name="id" />
- <field name="status" type="string" indexed="true" />
- <field name="username" type="string" indexed="true" />
- <field name="name" type="string" indexed="true" />
+ <field name="status" type="string" index="true" />
+ <field name="username" type="string" index="true" />
+ <field name="name" type="string" index="true" />
<embed-one field="address" />
Please sign in to comment.
Something went wrong with that request. Please try again.