Hibernate and False Duplicates

This issue hit me today (well documented at http://glueclue.blogspot.com/2006/02/hibernate-duplicates-with-join-fetch.html).

From what I understand, one way around this is to use “DISTINCT” in the HQL, but in my case this wasn’t possible because of the type of data in my persisted beans. 

I chose to use query.uniqueResult() since I expected a unique result. In any case, a close miss.

 

 

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s