We are migrating an existing application to use ObjectDB as primary database. In this case it's necessary to be backward compatible and a change of class definitions isn't possible. So we have some fields like this:
URI id; Set<URI> ids;
These fields are very important for querying and we need an index for both. But neither I can create an @Index for this nor I can define the URI class as an @Entity.
How can I deal with it?
PS: The only solution I found is to use @PrePersits + @PreUpdate and store a copy of URI as string also. But this consumes a lot of additional space.