Issue Details (XML | Word | Printable)

Key: NUCMONGODB-9
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

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

Support value generator of "identity" as use of MongoDB "_id" field (generated on persist)

Created: 02/Feb/11 08:28 AM   Updated: 07/Mar/11 05:36 PM   Resolved: 02/Feb/11 11:35 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.0.m2


 Description  « Hide
When an object is inserted into MongoDB it has an "_id" field assigned, with a hex value. This is mapped to an ObjectId. It can be used to look up an object

Andy Jefferson added a comment - 02/Feb/11 09:27 AM
Implemented for datastore identity using IDENTITY value generator strategy

@PersistenceCapable
@DatastoreIdentity(strategy=IdGeneratorStrategy.IDENTITY)
public class MyClass
{
    ...
}

Andy Jefferson added a comment - 02/Feb/11 11:35 AM
Can now do this for application or datastore id fields. Not supported on non PK fields at the moment

Andy Jefferson made changes - 02/Feb/11 11:35 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 07/Mar/11 05:36 PM
Status Resolved [ 5 ] Closed [ 6 ]