registers a custom marshaller for this class.
registers a custom marshaller for this class.
Custom marshallers can be used for tuning the performance to store and read objects. Instead of letting db4o do all the marshalling by detecting the fields on a class and by using reflection, a custom ObjectMarshaller allows the application developer to write the logic how the fields of an object are converted to a byte[] and back.
Downside:
- Indexes and querying can not be used.
Upsides:
- Not all fields need to be stored.
- Reflection does not need to be called.
As an alternative to using a custom marshallers you may want to consider writing an ObjectTranslator or your own Reflector .
The use of an ObjectMarshaller is not compatible with the use of an ObjectTranslator .
IObjectClass Interface | Db4objects.Db4o.Config Namespace | Db4objects.Db4o.Config.IObjectMarshaller