DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCMONGODB-130
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Marcin Jurkowski
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Store MongoDB

Native support for queries with Collection.contains() method invocation

Created: 16/Nov/13 02:30 AM   Updated: 19/Nov/13 10:29 AM   Resolved: 17/Nov/13 08:05 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.2.5

File Attachments: 1. Text File 0002-Support-native-matching-of-a-collection-element.patch (6 kB)
2. Text File 0003-Add-in-database-support-for-MongoDB-in-query.patch (6 kB)
3. File Add-query-collection-predicates.svn.diff (9 kB)


Datastore: MongoDB


 Description  « Hide
MongoDB supports matching an array object field against a single value. Moreover, it support matching a single-value field against a set of values (using $in operator).
This allows us to map certain collection .contains method invocations directly to MongoDB filter expressions.

The first patch adds mapping of contains() method invoked on a collection field into MongoDB equality expression. The second patch adds support for matching a single-value field against a constant collection of values. Please refer to individual patch for a more detailed description.

The first attached patch depends on NUCMONGODB-129. The second patch depends on the first one.

Marcin Jurkowski added a comment - 16/Nov/13 02:31 AM
Patches, depending on NUCMONGODB-129

Marcin Jurkowski made changes - 16/Nov/13 02:31 AM
Field Original Value New Value
Attachment 0002-Support-native-matching-of-a-collection-element.patch [ 12029 ]
Attachment 0003-Add-in-database-support-for-MongoDB-in-query.patch [ 12030 ]
Andy Jefferson added a comment - 17/Nov/13 08:44 AM
Please redo these patches also using the same method you used on NUCMONGODB-129. That way it is a patch applicable for Eclipse and SVN

Marcin Jurkowski added a comment - 17/Nov/13 07:35 PM
A merged 0002/0003 patch generated with "svn diff".

Marcin Jurkowski made changes - 17/Nov/13 07:35 PM
Andy Jefferson added a comment - 17/Nov/13 08:05 PM
SVN trunk has this now. Thx

Andy Jefferson made changes - 17/Nov/13 08:05 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.2.5 [ 12046 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 17/Nov/13 08:05 PM
Summary Native support for queries with .contains() method invocation Native support for queries with Collection.contains() method invocation
Andy Jefferson made changes - 19/Nov/13 10:29 AM
Status Resolved [ 5 ] Closed [ 6 ]