java - Store HashMap on MongoDB -
I need to rebuild the mongodibi object, I am saving, but it is not clear to me how How to save data to deliver data, later likely to ask Mongogabi The
This class I is a prototype I'm using your Java code:
public class UserProfile {/ ** UUID: Mongo certification / Shiro / MongoDB persistence Database * / private string for UUID; / ** user activation status * / private integer status; Private boolean administrator; / ** * All security features such as: password temporary password; Active; Token; * / Personal hashmap & lt; String, Object & gt; Security = new Hashmap & lt; String, Object & gt; (); / ** * To store information related to user such as Doketery, * Birthday, Area, Gender, etc. * Data structure * At this level * Not important * What is the content of this object / Private map & lt; String, string & gt; User Details; / ** Score confidence level: 0 default * / private-int score_ confidence_level; / ** * User model: Model / score list; The key is model_id and in Bean * All information about that model * / Private linkedHashp & lt; Integer, model & gt; UserModels;
which is a subset of the object I am now saved Munjo:
{ "_id": "f9f44e87-4260-4699-99a6- af6b58b4fb7e "," address ": {}," LASTUPDATE ":" 1414083484838 "," listvalues ": {}," mapvalues ": {" security ": {" CONFIRMATIONTOKEN ": null," TEMPORARYPASSWORD ":" 0 "" password: "$ shiro1 $ SHA-256 $ 500000 $ JXOo84Wapg0Tt50UIuwqRg == $ bSBShfqpXmdMwMuE3IWknbmZeyXGFhAWSFyjAsYU5 + 4 ="}, "MY_PROFILE": {}}, "User Model": {"5067": {"generated_date_timestamp": No. Long (1413985161866) "MODEL_ID": 5067, "score_id": { "0": { "score_level_id": 5267, "believe": 0, "Generated_timestamp" NumberLong (1413985161866)}}, "points": 0, "Delta_points": 0, "override_model": 0, "Override_score": 0, "model_lifecycle": {" model_status ": 0}," model_type ": 0," Question ": {}}," 5079 ": {" generated_date_timestamp ": NumberLong (1413985161866)," MODEL_ID ": 5079," score_id ": {" 0 ": { "score_level_id": 5292, "believe": 0, "generated_timestamp": NumberLong (1413985161866)}}, "points": 0, "delta_points": 0, "override_model": 0, "override_score": 0, "model_lifecycle" : {"Model_status": 0}, "model_type": 0, "questionnaire": {}},
The problem is here: from User Models
I am not allowed to execute any other queries saved from:
db.collecti On.find ({"userModelHistory.8401.model_id": "8401"});
To generate the required report, I need to find the values directly in fields like delta_points
.
So, my point is, how to save Hashem in MongoDB?
Another question, UUID, has not been saved as a Mongo _id (which includes the construction date). How can I generate it correctly?
Thanks,
Andrea
Comments
Post a Comment