Commit Graph
18 Commits
Author SHA1 Message Date
Ross Lawley 95c2643f63 Added test showing primary=True behaviour.
If you set a field as primary, then unexpected behaviour can occur.
You won't create a duplicate but you will update an existing document.

Closes #138
2011-05-18 20:31:28 +01:00
Ross Lawley fc2aff342b Unique indexes are created before user declared indexes
This ensures that indexes are created with the unique flag, if a user
declares the index, that would automatically be declared by the `unique_indexes`
logic.

Thanks to btubbs for the test case.
Fixes #129
2011-05-18 17:37:41 +01:00
Ross Lawley 5d5a84dbcf Spacing issue cleaned up 2011-05-18 16:24:35 +01:00
Ross Lawley 7526272f84 Added test example of updating an embedded field
Closes #139
2011-05-18 12:27:33 +01:00
Ross Lawley 5cbc76ea81 Pep8 2011-05-18 12:26:51 +01:00
Ross Lawley 7ba40062d3 Fixes ordering with custom db field names
Closes #125
2011-05-18 12:18:33 +01:00
Ross Lawley 1781c4638b Changed how the connection identity key is made
Uses the current thread identity as well as the process idenity to form
the key.

Fixes #151
2011-05-18 11:41:23 +01:00
Ross Lawley 1a049ee49d Added regression test case for mongoengine/issues/155 2011-05-18 11:06:14 +01:00
Ross Lawley 31521ccff5 Added queryset clone support and tests, thanks to hensom
Fixes #130
2011-05-18 10:30:07 +01:00
Ross Lawley e3b4563c2b Merge remote branch 'hensom/master' into dev 2011-05-18 10:06:16 +01:00
Ross Lawley c3f5ed0e0e Merge branch 'master' into dev 2011-05-18 10:06:02 +01:00
Ross Lawley 378b52321b Merge commit '18baa2dd7a4e909169b694cb6ec36214c5a51506' 2011-05-18 09:17:05 +01:00
Ross Lawley 98436f271e Merge branch 'master' into dev 2011-05-18 08:13:58 +01:00
Ross Lawley a76008e440 Merge pull request #164 from glyphobet/master
spherical geospatial operators.
Thanks again to glyphobet
2011-05-16 08:18:22 -07:00
Ross Lawley bd3340c73f Merge pull request #162 from glyphobet/master
Comments in unit tests should say "degrees," not "miles":

MongoDB docs are confusing, only the spherical queries $nearSphere and $centerSphere use radians. The $near and $center queries, which are the ones that are used in these mongoengine tests, use the same units as the coordinates. For distances on the earth, this means they use degrees. (This is also why the 2d indexes can be used for other 2d data, not just points on the earth.)

Here's a mongo shell session demonstrating that $near and $center use degrees, and that $nearSphere and $centerSphere are the ones that use radians:  https://gist.github.com/964126

So, these mongoengine tests are using $near and $center, which use degrees, not miles, kilometers, or radians.

Thanks glyphobet for the clarification and taking time to explain it!
2011-05-10 02:15:17 -07:00
Ross Lawley e9ad04f763 Merge pull request #160 from Ankhbayar/master
Added __hash__, __ne__ with test. 
Thanks Ankhbayar
2011-05-09 02:28:41 -07:00
Ross Lawley f0277736e2 Updated queryset to handle latest version of pymongo
map_reduce now requires an output.
Reverted previous _lookup_field change, until a test case
is produced for the incorrect behaviour.
2011-05-09 10:22:37 +01:00
Ross Lawley 49c978ad9e Merge remote branch 'upstream/master' 2011-05-09 09:01:19 +01:00