I see why you are commenting out this, it is because your query is not exactly correct, it is returning duplicate drugs because of two reasons i.e. one being you have a duplicate mapping and secondly you are not telling hibernate in the criteria to return unique matches in case of duplicates