-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve and simplify integration with ORM internals (#28)
This PR contains the following improvements: * It rewrites parts of how the `PolyglotListener` injects `Translatable` into entities when they are loaded and/or updates are flushed to the database. IMHO it's less interference with ORM lifecycle methods. We can avoid keeping a list of all entities with translations in `PolyglotListener`, which helps with garbage collection. * Previously, it was not possible to use translations with entities from an inheritance hierarchy. Now, every class in the hierarchy can define its own `@TranslationsCollection` and its own translations class. The translations class should only contain fields present in the corresponding class in the inheritance tree. The `@Locale` annotation will be searched for on parent classes as well.
- Loading branch information
Showing
15 changed files
with
967 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.