Jump to Navigation

Hibernate

Toplink and Hibernate differences prt2

Toplink is real sucky. This works in Hibernate but throws an error in Toplink.

"Select s from SalesOrder s where s.status.code not like 'Unconfirmed' and ( s.id in (714,653,-1))"

The error thrown is really stupid. 

" expecting RIGHT_ROUND_BRACKET, found 'in'

Toplink has some way to go to catch up to hibernate.

Differences between Hibernate JPA and Toplink JPA

On one of our projects we decided to switch JPA providers from Hibernate to Toplink. The main reason for this was that Hibernate depends on so many core open source libraries that other open source projects also use, that there are all kinds of version problems when the application is deployed in a JEE container, such as Tomcat or Glassfish, that uses different versions internally. Basically jar hell with all kinds of issues with classloaders loading the wrong version of the jar.

Data Transfer/Value Objects and Entity/Domain object mapping with Hibernate

I know that a lot of people, especially the hibernate developers, say that you can use hibernate entity or domain objects as data transfer (dto) or value object (vo) when transfering data between layers of your application. In my experience this seldom works as you are bound to get lazy load exceptions (LazyInitializationException) at some point. Exchanges about how to handle dtos/vos can get quiet heated on the hibernate forums and personally I canŽt understand why they are so adament about their šuser hibernate entity beansš approach.

Hibernate's HQL "inner join on" limitations

We use hibernate on our projects for the ORM technology. We are starting to use EJB3 now for all new development. Luckily its very similar to hibernate so we don't have to re-skill too much.

Hibernate HQL Inner Join

An issue that I came across recently was hibernate's HQL language inability to handle "inner join on" clauses. If your domain entity model has relationships defined between the related objects then something like

Subscribe to RSS - Hibernate


by Dr. Radut.