Read Support for Enums
supported in for an enum type. db4o only stores the actual number of enum values. Previously the driver just crashed when it encountered an enum. Now it creates a ‘replacement’ enum which just shows the stored number.
However currently there’s no easy way to query for a particular enum, simply because you cannot get the enum values. (Unless you guess the generated type name right). I can add that if someone needs it.
This is how it looks like:
Unfortunately the enum support is a little shady, because it only can deal with enums with a value range up to a few thousends. Otherwise I would have to generate every possible number, which is too much. Nevertheless I thing it covers the common cases.
Dealing with Name Conflicts
Earlier versions just assumed that each class name is unique. When you had the same class name in different namespaces the driver crashed. Now when a naming conflict occurs it will add the namespace to its name. Also the case where a type with the same name and namespace is stored in different assemblies is covered. The driver will add the assembly name to the end of the type name.
In general I hope that name collisions are new a rare thing. The handling is by no means perfect, but should cover most cases.
This is how it looks in action:
Try it out
- Recent Mixtapes
- RavenDB: Bundles, Cascade Deletion, Document Versioning