ORM

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