Fast Object Database for Java - with JPA/JDO support

No Entity Class API

#1

Both JPA and JDO are based on accessing and managing data in the database using persistable classes (mainly entity classes in JPA or persistence capable classes in JDO).

Usually, this is very convenient. Sometimes, however, it might be useful to access data without user defined persistable classes. For example, a tool that finds and replaces strings in the database should be generic and should not be bound to specific entity classes and persistent fields.

Therefore, an API for accessing (and maybe also modifying) data in the database without classes can be useful in some applications.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#2

Any news for this feature?
It would be very useful for creating an independent ObjectDBRealm, which is a pain right now.

#3

Actually there is a way now to use an ObjectDB database with no original classes:

  • Use the Metamodel API to find details on the entity classes in a database.
  • Obtain Class representation of entity classes using the getJavaType method, or use getClass on retrieved objects. ObjectDB generates synthetic classes automatically when persistable classes exists in the database and missing from the classpath. 
  • Use Java reflection API with information from the Metamodel API to access fields of retrieved objects, etc.
ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#4

Thanks for the info.

That's nice, but a huge pain in the same time. We need something portable, flexible and easy to use.

Your suggestion would be much more useful: "a tool that finds and replaces strings in the database should be generic and should not be bound to specific entity classes and persistent fields. Therefore, an API for accessing (and maybe also modifying) data in the database without classes can be useful in some applications."

Post Reply