Question

I'm trying to index objects containing a UUID into db4o, but I don't want it to index on the object itself, but rather the UUID. However, in the table, I'm seeing that the object has been broken up into three fields, MostSigBits, LeastSigBits, and SerialVersionUID. How do I somehow create 1 field using all three of these columns for proper indexing?

I've found the UUIDTypeHandler and I'm using it, but when I'm observing the query times (quering to see if UUID already exists in the DB) as I build a database, the times for the query is constantly growing. If its properly indexing on the UUID it should be a constant time operation yet it is not. What am I doing wrong?

Was it helpful?

Solution

Turns out UUID support is not enabled by default, but can be enabled with:

configuration.common().add(new UuidSupport());
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top