Following up on #393, some improvements might still be made to the Database.
Problems of the current approach:
Each object that wants to store non-plain objects need to be aware of the DbObjectSerialiser and use it before storing/pulling from the db
The configuration object of the DbObjectSerialiser is not completely safe in that if two of the accepted Serialisable types have the same TYPE field, it would be impossible to add them both (and the constructor would not realize that).
It might be better to have a wrapper fot the database, that also contains the serialiser inside. So that any class wanting to use the db can do so by using the wrapper, and the serialisation/deserialisation can be done there.
Following up on #393, some improvements might still be made to the Database. Problems of the current approach:
Serialisable
types have the same TYPE field, it would be impossible to add them both (and the constructor would not realize that).It might be better to have a wrapper fot the database, that also contains the serialiser inside. So that any class wanting to use the db can do so by using the wrapper, and the serialisation/deserialisation can be done there.