ObjectDB ObjectDB

JDO @Index in JPA?

#1

Hi!

I have a project which has all entities as JPA entities. I would like to make use of indexing, which I know that it's not available in JPA, but ObjectDB works with JDO as well.

Question1: will adding JDO @Index in a JPA entity have any effect or I have to switch that entity to JDO?

Question2: switching entities from JPA to JDO can happen when there is already data in the database? Or do I have to delete the previous data and start with a fresh db?

Thank you.

edit
delete
#2

You can use the JDO annotation with JPA without any additional change.

If you add an index to an existing entity class that already has non indexed instances stored in the database - use the Doctor to rebuild the index in a new copy of your database.

ObjectDB Support
edit
delete
#3

Great! Thank you!

edit
delete

Reply

To post on this website please sign in.