Is there any way that i can get a map as a result of a mongodb query using some spring data CrudRepository ? Here is my method which is returning a list of objects.
Query(value = "db.tweet_replies.aggregate([ {$match: { 'in_reply_parent_tweet_ID' : {$exists : true}}}, {$group: { _id: '$in_reply_parent_tweet_ID', maxDate: {$max : { $cond: [ {$gt : ['authorization_date_time','$user_reply.authorization_date_time']},'$authorization_date_time','$user_reply.authorization_date_time']}}}}])")
List<fReply> findByInReplyParentPostID(final String inReplyParentPostID);
for example it gives me this result.
{ "_id" : "638251888450756608", "maxDate" : NumberLong("1441006865000") }
{ "_id" : "637192023661895680", "maxDate" : NumberLong("1440760528000") }
i want to store this result a typed map instead of object list. Any idea ? . Thanks in advance :)