I am using the function mentioned below to delete a user (i added delete entityList[rowToDelete] to the function )My main issue is that the function deletes the user but somehow I lose the data in string items[] from other users
struct EntityStruct {
uint entityData;
// other stuff
string items[]; <--------- I lose the data in here/Cannot fetch the data from the array anymore
}
mapping(address => EntityStruct) public entityStructs;
address[] public entityList;
function deleteEntity(address entityAddress) public returns(bool success) {
if(!isEntity(entityAddress)) throw;
uint rowToDelete = entityStructs[entityAddress].listPointer;
address keyToMove = entityList[entityList.length-1];
entityList[rowToDelete] = keyToMove;
entityStructs[keyToMove].listPointer = rowToDelete;
entityList[rowToDelete]
entityList.length--;
return true;
}