Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

moved 'type' field to root level

  • Loading branch information...
commit dea3bf234ec69c4718e88952097134b3f3697e76 1 parent c6296ae
Jan Pieper authored November 03, 2011

Showing 1 changed file with 11 additions and 11 deletions. Show diff stats Hide diff stats

  1. 22  en/reference/association-mapping.rst
22  en/reference/association-mapping.rst
Source Rendered
@@ -51,19 +51,19 @@ In CouchDB two documents with this relationship will look like:
51 51
         "_id": "1234",
52 52
         "doctrine_metadata":
53 53
         {
54  
-            "type": "Article",
55 54
             "assocations":
56 55
             {
57 56
                 "author": "54321"
58 57
             }
59 58
         },
60  
-        "title": "An article"
  59
+        "title": "An article",
  60
+        "type": "Article"
61 61
     }
62 62
 
63 63
     {
64 64
         "_id": "54321",
65  
-        "doctrine_metadata": {"type": "User" },
66  
-        "name": "Benjamin"
  65
+        "name": "Benjamin",
  66
+        "type": "User"
67 67
     }
68 68
 
69 69
 ReferenceMany
@@ -98,25 +98,25 @@ In CouchDB documents with this relationship will look like:
98 98
         "_id": "1234",
99 99
         "doctrine_metadata":
100 100
         {
101  
-            "type": "Article",
102 101
             "associations":
103 102
             {
104 103
                 "comments": ["55555", "44444"],
105 104
             }
106 105
         },
107 106
         "title": "An article",
  107
+        "type": "Article"
108 108
     }
109 109
 
110 110
     {
111 111
         "_id": "55555",
112  
-        "doctrine_metadata": {"type": "Comment" },
113  
-        "text": "Thank you!"
  112
+        "text": "Thank you!",
  113
+        "type": "Comment"
114 114
     }
115 115
 
116 116
     {
117 117
         "_id": "44444",
118  
-        "doctrine_metadata": {"type": "Comment" },
119  
-        "text": "Very informative!"
  118
+        "text": "Very informative!",
  119
+        "type": "Comment"
120 120
     }
121 121
 
122 122
 Inverse ReferenceMany
@@ -150,8 +150,8 @@ In CouchDB documents with this relationship will look like:
150 150
 
151 151
     {
152 152
         "_id": "54321",
153  
-        "doctrine_metadata": {"type": "User" },
154  
-        "name": "Benjamin"
  153
+        "name": "Benjamin",
  154
+        "type": "User"
155 155
     }
156 156
 
157 157
 See how no "associations" key is present in the "doctrine_metadata" key. A view

0 notes on commit dea3bf2

Please sign in to comment.
Something went wrong with that request. Please try again.