Posts Tagged ‘jpa’

JPA and Hibernate: Problems with Polymorphic Queries

December 25th, 2016 No comments

JPA supports polymorphism you can handle how entire class hierarchies are persisted.  For instance, let’s your application manages a bunch of goods.  Nevertheless, particular varieties of goods need extra fields.  So, we can treat these as subclasses of Product.  JPA will permit us to search all varieties of goods at as soon as or restrict their search to particular subtypes.

Unfortunately, Hibernate’s support for restricting, grouping, and sorting by subtype is broken.  At the time of writing, there are several open bugs with patches that have not been addressed.  Until one of the wonderful volunteers on this great project gets a likelihood to deal with this difficulty, Hibernate is left with limited assistance for polymorphism in JPQL and no assistance in the Criteria API.

Read more…

Categories: Software Development Tags: ,

Custom User Types with JPA and Spring

December 9th, 2016 No comments

Thanks to Spring and JPA, one can easily and intuitively bind plain old Java objects to HTML forms, HTTP requests, and database tables. This beloved combination eliminates the tedium and droves of boiler plate code associated with developing data management applications. These tools support all Java primitives, wrappers, and even several high-level types natively. Fortunately, it is easy to add support for your own custom types.

Read more…

Eclipse, AspectJ, and JPA Static Meta-Model Generator

December 7th, 2016 No comments

The brief of it is that the AspectJ Developer Tools (AJDT) in Eclipse uses a different compiler then the default Eclipse compiler.  In reality, it is a number of years behind.  As such, it assistance for APT, which is utilized by JPA static meta-model generators, is practically nonexistent.

Read more…

Categories: Software Development Tags: , , ,