Hibernate’s @Filter Annotation – Apply Dynamic Filters at Runtime
|

Hibernate’s @Filter Annotation – Apply Dynamic Filters at Runtime

Hibernate provides 2 proprietary features that enable you to define additional filter criteria that Hibernate applies to every query that selects a specific entity class. This article will show you how to use the @FilterDef and @Filter annotations, which is the more flexible approach. You can activate and deactivate filter definitions for your current session…

Polymorphic association mappings of independent classes

Polymorphic association mappings of independent classes

JPA and Hibernate make it very easy to model associations between entities. You can model associations between 2 concrete classes or model a polymorphic association to an inheritance hierarchy. These mappings are more than sufficient for almost all of your association mappings. But sometimes, you might want to model a polymorphic association to independent entity…

Hibernate Performance Tuning Done Right

Hibernate Performance Tuning Done Right

Optimizing the performance of your application is a complex and application-specific task. All domain models are different, and often enough, the amount of data managed by them also differs significantly between multiple installations. In addition to that, almost all performance tuning techniques have trade-offs, which don’t make them a great fit for all situations. Because…