About change

manual

Schema Update

Explains how to handle JPA/JDO database schema evolution in ObjectDB. The <schema> configuration element supports renaming packages, classes and fields in ObjectDB databases as a complementary operation to renaming or moving these elements in the IDE during source code refactoring. Only these schema changes are ...

 
forum_thread

Request clarification of changes to accessor enhancement policy (non-getter prefix instead of getter suffix) AND annotations

In response to the forum posting http://www.objectdb.com/database/forum/994 changes were made to the way enhancement treats getters and setters (property accessors), namely there are no longer enhanced additional getters/setters, because the additional methods now use (since about version 2-6-5) this pattern: __odbHidden_[accessor_name] Instead of this pattern with a suffix (preserving the method as a setter or getter), prior to version 2-6-5: ...  setFieldName. May I just observe that this change massively tripped me up (because I was using the old hidden ... hidden methods to non property method names. This change is a huge GOTCHA, and should be announced somehow via some special ...

 
forum_thread

Schema migration - long to String

Hi, I need to change field type in our model from long to String. After changing filed type in our model and repairing database with doctor, most of our entities is gone. Doctor puts some errors on console: ... Hi, I need to change field type in our model from long to String. After changing filed type ... Is this a bug or there is some other way to change field type that I missed in ODB documentation? ...

 
forum_thread

Schema Update: class hierarchy change

Hello, we try to change the class hierarchy of an Entity. You wrote www.objectdb.com/database/forum/899 that ObjectDB support automatic schema evolution for adding and removing fields and for class hierarchy change.   But our small test failed: At first create a DataBase with one Object of MyEntity ... Hello, we try to change the class hierarchy of an Entity. You wrote ... for adding and removing fields and for class hierarchy change.   But our small test failed: At first ... value ; } } Then we change the class hierarchy of MyEntity from NamedEntity to BaseEntity: ...

 
manual

Updating JPA Entity Objects

Explains how to use JPA to delete (remove) entity objects from the database.... Transparent Update Automatic Change Tracking UPDATE Queries Transparent ... are not managed yet are also persisted. Automatic Change Tracking As shown above, an update is achieved by modifying a ...

 
forum_thread

Remove an entity which attributes were changed - OptimisticLockException

We use an OSGi environment and we have three OSGi plugins.   In plugin A an entity is loaded and the entity is passed to plugin B. Plugin B changes an attribute on the entity. Plugin C removes the entity from the database. After commit the transaction an exception is caused with optimistic lock exception of the removed entity. If this operations on the entity are executed in only one plugin, it works well. ... B) the version changed to 8. entityA.setMap(); // change the entity field EntityManager em = getEntityManager(); ... simple example, as in #12 above? Maybe by applying a small change to that console test case? It is very difficult to follow an issue in a ...

 
forum_thread

Primary key generation problem after changing entity package

Hi, I changed package name for some of my entities in database. I added info in <schema><package... /></schema> of my configuration file - and the changes have been succesfully made in database. Unfortunately, sequences have been probably lost for changed entity classes. After schema change I keep getting errors : Attempt to reuse an existing primary key value... My primary keys are annotated as shown below : ... probably lost for changed entity classes. After schema change I keep getting errors : Attempt to reuse an existing primary key ... made. Changing sequenceName don't help. Only when I change SequenceGenerator name new instances are persisted with correct ...

 
forum_thread

Date field Index is corrupted due to time change

Hi, can you shed some light on why we cannot delete data from the attached DB file. A delete attempt with DB explorer results in the following exception: ... starts for the fist time. The size of the DB file does not change during the life of the system as it is large enough to contain all ...   It will be beneficial to us to know if time change, in particular back one hour, may have impact on the operation of Object ...

 
forum_thread

World database - Changing country ID

Hi, I am getting familiar with OpenDB as I am considering using it in some project. I opened Sample world DB in ObjectDB Explorer - and couldn't find my country, as it has invalid id ( ez instead of cz ). I changed the id of country to "cz". But when I try to find the country: SELECT c FROM Country c WHERE id = "cz" no results are returned. If i find it by name, I can see ID has changed to cz. However Country#ez is still displayed in the top. ... works OK. So the question is - is it possible to change field which is primary key? If so what am I doing wrong? Thanks ... should be fixed to prevent it. If you have to change the primary key you should create a new entity object with the new ...

 
forum_thread

Relationships and tracking changes

3. Object relationship I try to create a 1->n relation (EBVerlag is 1 and EBUser is n) between two tables: Table "EBVerlag": #1 2017-02-10 17:29 Hello !! I am new in JPA / ObjectDB development and I have many questions:   ...