User A creates an event
{
"EventSourcedId": "9c296e27-1fb5-4f4b-9435-36a9e21db2e8",
"ActivityId": "fc76f130-bbb1-4b11-85c4-399da9f26885",
"Activity": {
"id": "fc76f130-bbb1-4b11-85c4-399da9f26885",
"type": "productmovement",
"time": 1445268714,
"data": {
"oratktnumber": null,
"dtnumber": null,
"origin": null,
"receivedon": null,
"destination": null,
"isoratkt": false,
"lineitems": [],
"wholemudtank": [],
"wholemud": []
},
"createdby": "User A"
},
"When": "2015-10-19T15:31:54.0181075Z"
}
event has ActivityId which is appended to the index activity
{
"EventSourcedId": "9c296e27-1fb5-4f4b-9435-36a9e21db2e8",
"Index": [
"36f3cbaf-1d8a-4498-a8d4-d90513475fe8",
"29f0bb17-2e58-422d-a772-2268be27fd06",
"5d76a006-83d1-449e-8bbe-5db671452cb7",
"fc76f130-bbb1-4b11-85c4-399da9f26885" (Index added)
],
"When": "2015-10-19T15:31:54.0241075Z"
}
User B creates an event
{
"EventSourcedId": "9c296e27-1fb5-4f4b-9435-36a9e21db2e8",
"ActivityId": "FB75AEE1-348C-447B-9A46-4430896F387A",
"Activity": {
"id": "FB75AEE1-348C-447B-9A46-4430896F387A",
"type": "productmovement",
"time": 1445268714,
"data": {
"oratktnumber": 123456,
"dtnumber": null,
"origin": US,
"receivedon": null,
"destination": null,
"isoratkt": false,
"lineitems": [],
"wholemudtank": [],
"wholemud": []
},
"createdby": "User B"
},
"When": "2015-10-19T15:31:54.0181075Z"
}
but when User B saves his data the Index of User A is overwritten or removed though ES has that data(loses User A Index)
{
"EventSourcedId": "9c296e27-1fb5-4f4b-9435-36a9e21db2e8",
"Index": [
"36f3cbaf-1d8a-4498-a8d4-d90513475fe8",
"29f0bb17-2e58-422d-a772-2268be27fd06",
"5d76a006-83d1-449e-8bbe-5db671452cb7",
"FB75AEE1-348C-447B-9A46-4430896F387A" (Index added)
],
"When": "2015-10-19T15:31:54.0241075Z"
}
After merging THE RESULT SHOULD be :
{
"EventSourcedId": "9c296e27-1fb5-4f4b-9435-36a9e21db2e8",
"Index": [
"36f3cbaf-1d8a-4498-a8d4-d90513475fe8",
"29f0bb17-2e58-422d-a772-2268be27fd06",
"5d76a006-83d1-449e-8bbe-5db671452cb7",
"fc76f130-bbb1-4b11-85c4-399da9f26885",
"FB75AEE1-348C-447B-9A46-4430896F387A"
],
"When": "2015-10-19T15:31:54.0241075Z"
}
which is not happening.
How Can I merge.
I am new to use Event store.
Regards
Himanshu Chandra