This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate : Repetition in FetchMode.JOIN Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate : Repetition in FetchMode.JOIN" Watch "Hibernate : Repetition in FetchMode.JOIN" New topic

Hibernate : Repetition in FetchMode.JOIN

Anthony D'Souz
Ranch Hand

Joined: Oct 13, 2011
Posts: 65
I have a dept table and an emp table. The dept table had a one-to-many relation with emp table w.r.t the deptId.

When i tried this code:

This is the generated output in my console for the sql query generated by the hibernate:

In the generated hibernate query I can clearly see that there are repetition in columns of the emp table. But i don't want these repetitions to appear. How to avoid the repetition in the hibernate generated query then?

Please inform how to remove these repetitions.

Anthony D'Souz
Ranch Hand

Joined: Oct 13, 2011
Posts: 65
Any help on this please?
I agree. Here's the link:
subject: Hibernate : Repetition in FetchMode.JOIN