Known issues

Data changes

There are two basic ways to keep your data up to date.

Structural

As with most projects, data that needs persisting changes over time. In EclipseStore that’s handled through Legacy Type Mapping.

That consists of Automatic Mapping through EclipseStores internal heuristic and Explicit Mapping by the user.

Values

Keeping data up-to-date is made easy through XDEV’s MicroMigration explained in detail in Versioned Migration.

Spring Developer Tools

Using Spring Developer Tools (spring-boot-devtools) can lead to serious issues in your project. That is manly due to the LiveReload feature and the usage of a "Restart ClassLoader". It derives from the issue with EclipseStore.

To mitigate this issue, Spring-Data-Eclipse-Store listens to the closing of the Spring-Context and shuts down the storage. This should handle most problems with the ClassLoader. Restarting the storage leads to a reloading of all entities and may take some time, yet circumvents the Restart ClassLoader Issue.

The behavior can be configured through Properties and is implemented in the EclipseStoreClientConfiguration.java.

In SQL databases, relationships between entities are explicitly defined and enforced by the database system. This ensures that constraints, such as foreign keys, are consistently maintained.

In contrast, relationships in a Java object graph are solely defined by the developer. If an object within the graph does not maintain a reference back to its parent or containing object, it has no inherent knowledge of that relationship. Consequently, finding such a relationship requires searching the entire object graph, which can be highly inefficient.

Example structure with orders and articles

Example Scenario

Consider an order object that contains references to several article objects. In this case, determining which order contains a specific article is nearly impossible without traversing the entire object graph to locate it. This lack of direct reference contrasts sharply with the behavior of SQL databases.

What Happens When an Article is Deleted?

  1. In an SQL Database:
    Attempting to delete an article that is still referenced (e.g., by an order) would typically result in an exception.
    The database enforces referential integrity, preventing the deletion of a referenced entity.

  2. In Spring-Data-Eclipse-Store:
    Deleting an article from the article repository is allowed, even if it is still referenced elsewhere.
    The system does not track or enforce such references. As a result:

    • The article is removed from the repository.

    • However, the order still retains its reference to the now-deleted article.

    • If the order is subsequently saved, the article is reintroduced into the repository.

This behavior is fundamentally different from the strict relationship management seen in SQL databases. Developers must be aware of these differences to avoid unintended side effects in their applications.