MapDB uses custom serialization which stores class metadata at single place.
Thanks to it is 10x more efficient than standard Java serialization.
Using custom values in MapDB has three conditions:
1) classes should be immutable. There is instance cache, background serialization etc
Modifing your classes after they were inserted into MapDB may leed to unexpected things.
2) You should implement `Serializable` marker interface. MapDB tries to stay compatible
with standard Java serialization.
3) Even your values should implement equalsTo method for CAS (compare-and-swap) operations.
if (this == o) return true;
if (city != null ? !city.equals(person.city) : person.city != null) return false;
if (name != null ? !name.equals(person.name) : person.name != null) return false;
map2.put("North", new Person("Yet another dwarf","Somewhere"));