Hacker News new | ask | show | jobs
by jiggy2011 5323 days ago
I had a similar problem to this, it pissed me off the ages although I did spend allot of time trying to do it with @ManyToMany as having a separate Entity just for the relationship seemed like bloat to me. As I recommended before, read the book "Java Persistence with Hibernate" and things will start to make more sense.

Hibernate is generally far more concerned with being flexible and robust than it is with being DRY or providing a perfect database abstraction. You really do still have to think about your data from the point of view of the DBMS regards 'Owning' Associations etc.

One thing with Play! is that it does try to over abstract hibernate a little bit and turn it into ActiveRecord which is fine for simple things but hibernate is not like ActiveRecord!