Permalink
Commits on Jan 10, 2013
  1. Only convert tag sets if necessary for setReadPreference()

    jmikola committed Jan 10, 2013
    This ensures the conversion function properly does nothing in driver version 1.3.3+. Adding the NOP logic in the calling context would lead to duplicated code, so we allow the utility function to be invoked even if there is nothing to do.
    
    See: https://jira.mongodb.org/browse/PHP-638
  2. Only convert numeric read preference types (driver <=1.3.2)

    jmikola committed Jan 10, 2013
    In driver version 1.3.3+, getReadPreference() will return a type in the format accepted by setReadPreference(), which obviates the need for conversion. See: https://jira.mongodb.org/browse/PHP-638
Commits on Dec 19, 2012
  1. Fix documentation typo

    jmikola committed Dec 19, 2012
Commits on Dec 18, 2012
  1. Merge pull request #78 from jstout24/use-keys-arg

    jwage committed Dec 18, 2012
    Added ability to return documents without the id as the key in Cursor::toArray()
  2. Merge pull request #87 from doctrine/readprefs

    jwage committed Dec 18, 2012
    Support 1.2.12 and 1.3.x drivers (slaveOkay and read pref compatibility)
Commits on Dec 17, 2012
  1. Allow cursor slaveOkay to handle read preferences

    jmikola committed Dec 11, 2012
    Driver 1.3.0 deprecated slaveOkay() on MongoCursor but did not implement setReadPreference(); however, this code will allow read preference support once the method is implemented. Until then, we NOP in lieu of calling a deprecated method or throwing an exception.
  2. Don't set cursor flags unnecessarily and cast arguments

    jmikola committed Dec 11, 2012
    If slaveOkay defaults to false in Doctrine's class and is set each time the cursor is initialized, there is no way to inherit from MongoDB or MongoCollection ancestors. Instead, initialize these fields with empty values and only set them on the cursor if a non-null value is available.
    
    Casting input arguments explicitly will ensure that any method call is sufficient to remove the null default.
  3. Fix setSlaveOkay() for read preferences and preserve tag sets

    jmikola committed Dec 11, 2012
    Fix logic for check if old read preference was PRIMARY (the utility method is used to convert the numeric type to the string constant).
    
    Before setSlaveOkay(true) would assign the SECONDARY_PREFERRED read preference, try to preserve the existing tag sets.
  4. Utility methods for working with read preferences

    jmikola committed Dec 11, 2012
    convertType() is necessary because the driver returns numeric types in getReadPreference() instead of the string constants accepted by setReadPreference(). This is likely a bug in the early 1.3.x versions.
    
    convertTagSets is necessary because the format returned by getReadPreference() differs from that accepted by setReadPreference(). This likely isn't a bug, but it's something to handle when we preserve tag sets in the setSlaveOkay() Database and Collection methods.
  5. Reimplement slaveOkay methods for old/new drivers

    jmikola committed Dec 11, 2012
    Maintain BC and simply wrap methods for pre-1.3.0 drivers. Utilize read preferences for 1.3.0+ drivers.
Commits on Dec 13, 2012
  1. Merge pull request #86 from lexwolfy/master

    jmikola committed Dec 13, 2012
    Make builder selectSlice command work if limit is null
Commits on Dec 10, 2012
  1. Make selectSlice work

    lexwolfy committed Dec 10, 2012
    Make selectSlice work if limit is null.
    Allow negative slice in order to return the last n items in array.
Commits on Dec 8, 2012
  1. Support $maxDistance on $near query field criteria

    jmikola committed Dec 8, 2012
    Since maxDistance() was already used for the geoNear option with the same name, the method is overloaded based on whether geoNear() has already been called. Fixes #85.
Commits on Dec 5, 2012
  1. Merge pull request #83 from doctrine/mongoclient

    jmikola committed Dec 5, 2012
    Support Mongo driver 1.3.1+ and MongoClient class
  2. Change the assertions used for testing the success response of a query.

    henrikbjorn committed with jmikola Nov 29, 2012
    The change is necesarry to test the new defauls returned from
    MongoCollections now that acknowledge writes is the new default.
    
    Add a assertArrayHasKeyValue to do this, to make sure that 'ok' => 1.0
    is set.
  3. {set,get}SlaveOkay deprecation.

    henrikbjorn committed with jmikola Nov 28, 2012
    Along with the other deprecations {set,get}SlaveOkay have been removed
    with its corresponding tests.
  4. MongoDB Driver 1.3.0 changes.

    henrikbjorn committed with jmikola Nov 28, 2012
    As of 1.3.0 the Mongo class is now deprecated which means that the
    Connection class have gotten it's typehinting changed. The methods are
    still called getMongo and setMongo. This changed have been reflected in
    it's Tests.
    
    composer.json now specifies the requirement for ext-mongo to be greater
    or equals to 1.3.0.
  5. Merge pull request #74 from doctrine/gridfs-fixes

    jmikola committed Dec 5, 2012
    Redo GridFS upserts and fix up GridFS tests
  6. Fetch MongoGridFSFile after storage instead of manual construction

    jmikola committed Nov 30, 2012
    Manually constructing a MongoGridFSFile to save on GridFSFile causes problems if we end up calling getSize() on that object later. Fetch the actual object using the driver to ensure the internal state is sound.
    
    See: 45016c7#commitcomment-2126151
  7. WIP fix for #70

    jmikola committed Oct 26, 2012