orientechnologies/orientdb — pull request #2583 by henryzhao81 (2014-07-17 07:16:13+00:00)
Title: For distributed mode

1) For backward compatibility.
Due to many existing APIs to save document by calling default doc.save() without specify cluster name, if create multi clusters, it will do round robin to shard document equally in each cluster, no way to specify cluster to store, especially in distributed mode,

To solve this issue, i can create a hook to change cluster id for each document to give the fix cluster Id to store and set DISTRIBUTED_EXECUTION_MODE to SOURCE_NODE.
2) Add to toMap function for ODocument