Implemented sharding support through special annotation
Created composer setup configuration
Update DocumentPersiseter upsert to use shard key if defined
ShardKey property is now under standard type's options
Added validation for 'options' property on annotation class
Updated composer.json description
Make sure that if shard key is identifier, query part containst '_id' instead of 'id'
Strip values from update if they're shard keys
Update DocumentPersister to convert shard keys that match ObjectId pattern to \MongoId()
collection, custom_id, object_id and raw_type types added to basic-mapping.rst

The basic mapping type in basic-mapping.rst did not seem to be up
to date with the MongoDB Types defined in Doctrine/ODM/MongoDB
(https://github.com/mapado/mongodb-odm/tree/master/lib/Doctrine/ODM/MongoDB/Types).

The following types were added:
 * ``collection``
 * ``custom_id``
 * ``object_id``
 * ``raw_type``

Also, a quick note was added on which MongoDB type the ``collection``
type is mapped to.

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@mapado.com>
"indexed" → "numerically" indexed, in basic-mapping.rst

Correction asked by @jmlkola
Signed-off-by: Balthazar Rouberol <balthazar.rouberol@mapado.com>
Fix wrong syntax on addEventListener
Track current field in ODM's query builder

The $currentField property is only used by the ODM Builder class, so there is no need to rely on the parent class to track field() calls.
Only prepare first part of raw fields in queries (fixes #628)
Docs: Remove use of setDefaultAnnotationNamespace(), add "use" on documents.

- setDefaultAnnotationNamespace() was removed in Doctrine 2.2.
- remove reference to it in the introduction document.
- add namespace-aliased annotations on document examples.
Also updated getting-started.rst.
Fixes CLI using $helpers as a hash with cli-config defining it as an array.

- Define it as the expected array('dm' => helper) hash.
- This caused "[InvalidArgumentException] The helper "dm" is not defined."
Accept boolean values for UnitOfWork hints from Cursor
Rename CursorHydrationTest to CursorTest and test hydrations
Refactor Cursor to proxy all BaseCursor methods and maintain no state

This refactor ensures that the ODM Cursor never changes state, and makes it possible to later remove extension of the BaseCursor, implement Iterator, and only compose the BaseCursor. All methods that change the cursor state proxy to the BaseCursor, and we need not override methods that simply call the underlying MongoCursor, since both the ODM Cursor and BaseCursor maintain a reference to the same MongoCursor instance.

Additionally, by removing state from the ODM Cursor, we fix an issue with recreate() being unreliable.

This commit also adds a test for preserving sort order after Cursor::recreate(), which was contributed by @levofski in #635.