Level level = character.getLevel();
if (level != null) {
level.getCharacterCollection().remove(character);
level = em.merge(level);
}
Map lastOutpost = character.getLastOutpost();
if (lastOutpost != null) {
lastOutpost.getCharacterCollection().remove(character);
lastOutpost = em.merge(lastOutpost);
}
Inventory equipmentPack = character.getEquipmentPack();
if (equipmentPack != null) {
equipmentPack.getCharacterCollection().remove(character);