Skip to content

Commit 231bd0e

Browse files
committed
Merge pull request #1201 from doctrine/happy-birthday-odm
Happy birthday ODM
2 parents 2e0afa2 + ace06e8 commit 231bd0e

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed

CHANGELOG-1.0.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,83 @@ To generate a changelog summary since the last version, run
1515
1.0.x-dev
1616
---------
1717

18+
1.0.0 (2015-08-18)
19+
------------------
20+
21+
All issues and pull requests in this release may be found under the
22+
[1.0.0 milestone](https://github.com/doctrine/mongodb-odm/issues?q=milestone%3A1.0.0).
23+
24+
#### Stricter mapping and slightly changed behaviour
25+
26+
For this stable release we introduced more checks while parsing of document
27+
mappings as well as additional runtime sanity checks. This entailed some
28+
modifications to UnitOfWork's previous behavior; however, it should ensure more
29+
consistency with the database. If upgrading from a previous beta release, please
30+
review the list of relevant changes below to ensure a smooth upgrade to 1.0.0:
31+
32+
* [#1191](https://github.com/doctrine/mongodb-odm/pull/1191): ReferenceMany's
33+
`sort` option may only be used with inverse-side references or references
34+
using the `set`, `setArray`, `atomicSet`, and `atomicSetArray` strategies.
35+
* [#1190](https://github.com/doctrine/mongodb-odm/pull/1190): Identifiers using
36+
the `AUTO` strategy must be a valid ObjectId (either a `MongoId` object or a
37+
24-character hexadecimal string).
38+
* [#1177](https://github.com/doctrine/mongodb-odm/pull/1177): The `collection`
39+
field mapping no longer accepts a `strategy` property, which was previously
40+
unused.
41+
* [#1162](https://github.com/doctrine/mongodb-odm/pull/1162): Simple references
42+
must not target discriminated (also known as mixed type) documents.
43+
* [#1155](https://github.com/doctrine/mongodb-odm/pull/1155): Collection
44+
updates take place immediately after the owning document. Therefore,
45+
modifications done via `post*` events will no longer be saved to database.
46+
This change ensures that events are fired when they are meant to (as
47+
discussed in [#1145](https://github.com/doctrine/mongodb-odm/issues/1145)).
48+
* [#1147](https://github.com/doctrine/mongodb-odm/pull/1147): Identifier fields
49+
must always have an `id` field type; however, the field's data type (e.g.
50+
string, integer) may vary based on the strategy option.
51+
* [#1136](https://github.com/doctrine/mongodb-odm/pull/1136): Owning and inverse
52+
sides of reference relationship must specify `targetDocument` or `discriminatorMap`.
53+
* [#1130](https://github.com/doctrine/mongodb-odm/pull/1130): `EmbedMany` and
54+
`ReferenceMany` collections using `pushAll` and `addToSet` strategies are
55+
re-indexed after database synchronization to ensure consistency between the
56+
database and in-memory document.
57+
* [#1206](https://github.com/doctrine/mongodb-odm/pull/1206): ODM's Cursor
58+
class no longer extends `Doctrine\MongoDB\Cursor`. Instead, it implements the
59+
new `Doctrine\MongoDB\CursorInterface` interface, which was introduced in
60+
Doctrine MongoDB 1.2.0. Eager cursor behavior is now fully handled by
61+
Doctrine MongoDB, so the ODM EagerCursor class has been deprecated (to be
62+
removed in 2.0).
63+
64+
#### Parent association is available in `postLoad` events
65+
66+
[#1152](https://github.com/doctrine/mongodb-odm/pull/1152) makes it possible to
67+
access an embedded document's parent association through the UnitOfWork. This
68+
effectively allows you to set a reference to the parent document on an embedded
69+
document field.
70+
71+
#### Performance optimizations
72+
73+
[#1112](https://github.com/doctrine/mongodb-odm/pull/1112) fixes a potential
74+
performance and consistency issue by ensuring that reference-primed queries
75+
always use an eager cursor.
76+
77+
[#1086](https://github.com/doctrine/mongodb-odm/pull/1086) improves `count()`
78+
performance for uninitialized, inverse-side references by avoiding full document
79+
hydration and calculating the count via the database command
80+
(e.g. `MongoCursor::count()`).
81+
82+
[#1175](https://github.com/doctrine/mongodb-odm/pull/1175) optimized the
83+
performance of `UnitOfWork::commit()`, which is good news for those working with
84+
a large number of managed documents. As a technical detail, we reduced the
85+
complexity from O(n^2) to to O(n), where n is number of documents scheduled for
86+
synchronization. Additionally, we removed unneeded overhead for embedded
87+
documents and did some general code cleanup in
88+
[#782](https://github.com/doctrine/mongodb-odm/pull/782) and
89+
[#1146](https://github.com/doctrine/mongodb-odm/pull/1146), respectively.
90+
91+
[#1155](https://github.com/doctrine/mongodb-odm/pull/1155) reduced the number of
92+
queries issued to the database for document insertions, deletions, and clearing
93+
of collections.
94+
1895
1.0.0-BETA13 (2015-05-21)
1996
-------------------------
2097

README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ The Doctrine MongoDB ODM project is a library that provides a PHP object mapping
1111
* [Website](http://docs.doctrine-project.org/projects/doctrine-mongodb-odm)
1212
* [Documentation](http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/index.html)
1313
* [API](http://www.doctrine-project.org/api/mongodb_odm/1.0/index.html)
14-
* [Issue Tracker](http://www.doctrine-project.org/jira/browse/MODM)
14+
* [Issue Tracker](https://github.com/doctrine/mongodb-odm/issues)
1515
* [Releases](https://github.com/doctrine/mongodb-odm/releases)

docs/en/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
# The short X.Y version.
4848
version = '1.0'
4949
# The full version, including alpha/beta/rc tags.
50-
release = '1.0.0-BETA13'
50+
release = '1.0.0'
5151

5252
# The language for content autogenerated by Sphinx. Refer to documentation
5353
# for a list of supported languages.

docs/en/reference/introduction.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ its dependencies. The easiest way to do this is with `Composer`_:
324324

325325
::
326326

327-
$ composer require "doctrine/mongodb-odm=~1.0.0-BETA13@dev"
327+
$ composer require "doctrine/mongodb-odm=~1.0"
328328

329329
Once ODM and its dependencies have been downloaded, we can begin by creating a
330330
``bootstrap.php`` file in our project's root directory, where Composer's

0 commit comments

Comments
 (0)