Add support for sharded collections in mongodb

Description

getEntityManager().merge(entity); will result in an error in a cluster environment, because the update statement is going with {upsert: true }.
With sharded collections need to specify whole shard key in order to update a record. It isn't enough to specify only primary key.
I'm not sure, perhaps you already have an option for this situation, but with lack of documentation I wasn't be able to find it.
May be need to create a new annotation to define a shard key for the entity, or make a parameter for the persistence context to disable upsert:true... Need to do something...

Environment

Glassfish 4.0 (Windows8), Mongo 2.6.4 (Fedora)

Assignee

Unassigned

Reporter

VadimsZ

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure