Permalink
Browse files

moved 'type' field to root level

  • Loading branch information...
1 parent c6296ae commit dea3bf234ec69c4718e88952097134b3f3697e76 @janpieper janpieper committed Nov 3, 2011
Showing with 11 additions and 11 deletions.
  1. +11 −11 en/reference/association-mapping.rst
@@ -51,19 +51,19 @@ In CouchDB two documents with this relationship will look like:
"_id": "1234",
"doctrine_metadata":
{
- "type": "Article",
"assocations":
{
"author": "54321"
}
},
- "title": "An article"
+ "title": "An article",
+ "type": "Article"
}
{
"_id": "54321",
- "doctrine_metadata": {"type": "User" },
- "name": "Benjamin"
+ "name": "Benjamin",
+ "type": "User"
}
ReferenceMany
@@ -98,25 +98,25 @@ In CouchDB documents with this relationship will look like:
"_id": "1234",
"doctrine_metadata":
{
- "type": "Article",
"associations":
{
"comments": ["55555", "44444"],
}
},
"title": "An article",
+ "type": "Article"
}
{
"_id": "55555",
- "doctrine_metadata": {"type": "Comment" },
- "text": "Thank you!"
+ "text": "Thank you!",
+ "type": "Comment"
}
{
"_id": "44444",
- "doctrine_metadata": {"type": "Comment" },
- "text": "Very informative!"
+ "text": "Very informative!",
+ "type": "Comment"
}
Inverse ReferenceMany
@@ -150,8 +150,8 @@ In CouchDB documents with this relationship will look like:
{
"_id": "54321",
- "doctrine_metadata": {"type": "User" },
- "name": "Benjamin"
+ "name": "Benjamin",
+ "type": "User"
}
See how no "associations" key is present in the "doctrine_metadata" key. A view

0 comments on commit dea3bf2

Please sign in to comment.