diff --git a/mandango/basic-mapping.rst b/mandango/basic-mapping.rst index 618c5ae..53469a1 100644 --- a/mandango/basic-mapping.rst +++ b/mandango/basic-mapping.rst @@ -111,7 +111,7 @@ These are the options the Mandango's Core extension accepts, but you can use more options depending on the extensions you use. .. note:: - You can define as fields as you want to take advantage of the Mongo free + You can define as many fields as you want to take advantage of the Mongo free schema. Mandango has been designed thinking in that, and to define lots of fields is not a performance problem. diff --git a/mandango/embedded-mapping.rst b/mandango/embedded-mapping.rst index 9ecef56..3574890 100644 --- a/mandango/embedded-mapping.rst +++ b/mandango/embedded-mapping.rst @@ -4,7 +4,7 @@ Embedded Mapping The *embedded documents* are documents inside other documents. To map embeddeds you have to indicate the embedded name and the document class -you are going to embedd. +you are going to embed. The embedded documents are mapped in the same way as regular documents, so you just have to indicate that it's an embedded document activating the option diff --git a/mandango/reference-mapping.rst b/mandango/reference-mapping.rst index 32bf17c..62459d1 100644 --- a/mandango/reference-mapping.rst +++ b/mandango/reference-mapping.rst @@ -2,7 +2,7 @@ Reference Mapping ================= References are relations to other documents. MongoDB doesn't -allow joins or foreign keys, nut you can save references to other documents +allow joins or foreign keys, but you can save references to other documents and later consult them. Mandango allows you to do this very easily. You just have to indicate the name of the reference and the document class you want diff --git a/mandango/relation-mapping.rst b/mandango/relation-mapping.rst index bf75398..0cc32e6 100644 --- a/mandango/relation-mapping.rst +++ b/mandango/relation-mapping.rst @@ -2,7 +2,7 @@ Relation Mapping ================ The relations are relations **from** other documents. They are the opposite to -references, so when we use relations we have to have been defined the reference +references, so when we use relations we have to have defined the reference as well. There are three types of relations, and to use one or the other depends on the diff --git a/mandango/repositories.rst b/mandango/repositories.rst index 7b41aad..aa232c7 100644 --- a/mandango/repositories.rst +++ b/mandango/repositories.rst @@ -40,7 +40,7 @@ internally:: $articleRepository->save($article); // saving several documents - $articleRepository->save(array($article1, $article2)); + $articleRepository->save(array($article1, $article2)); .. note:: To insert documents it is used the batchInsert_ method, diff --git a/mandango/working-with-objects.rst b/mandango/working-with-objects.rst index 0c21f19..6a9bcbc 100644 --- a/mandango/working-with-objects.rst +++ b/mandango/working-with-objects.rst @@ -27,7 +27,7 @@ can choose the arguments, and pass them as an array creating the documents:: Identifier ---------- -To access the identifier ``_id`` of the mongo documents it is used the +To access the identifier ``_id`` of the mongo documents use the ``->getId()`` method. It returns ``null`` if the document is new:: $id = $article->getId(); @@ -98,8 +98,8 @@ Adding and deleting referenced documents:: $article->addCategories($categories); // several // remove one by one - $categories()->remove($category1); - $categories()->remove($category2); + $categories->remove($category1); + $categories->remove($category2); // removing several at the same time $categories->remove(array($category1, $category2));