Move projections to separate module #77
Labels
bug
Something isn't working
feature
New feature or request
refactoring
Internal improvement that does not change the API or library behavior
The projection feature was originally not designed very well and has a number of issues:
Where we want to go:
How the migration process will look:
MigrationProjectionsCache
, which immediately calls the methodstable.{save,delete}
without waiting for a commit.withoutProjections()
to the table that sets a property indicating that projections should not be processed.ProjectionCache
, leaving the logic fromMigrationProjectionsCache
directly in theTable
methods under thewithoutProjections
flag.ProjectionsTable
proxy that acceptsTable<E>
in the constructor and setswithoutProjections()
on the proxied object.ProjectionsTable
, override only theinsert
,save
, anddelete
methods with the projection logic and new error handling.Entity
class with the base implementation ofcreateProjections
, throw a specialCreateProjectionNotOverridedException
.Table
, catch the exception and ifwithoutProjections
is set, fail; otherwise, log an error with a requirement to migrate to the new logic.TODO: think how to protect services which can call tx.table(MyEntityWithProjections.class).{insert,save,delete} directly
The text was updated successfully, but these errors were encountered: