This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes hql not returing unique values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hql not returing unique values" Watch "hql not returing unique values" New topic

hql not returing unique values

sheik usman

Joined: Nov 16, 2013
Posts: 1


when the test class run it returns only the last record of the dp table. meas if db contain 5 record then test class returns 5 times of last record . help me please

suppose db contain (1) usman,hi,12/11/2013, (2) pavan,hello,2/12/2013,
output is pavan,hello,2/12/2013, pavan,hello,2/12/2013,

but when we use createSqlQuery output is getting unique values

what is the problem please help me
I agree. Here's the link:
subject: hql not returing unique values
Similar Threads
Hibernate/Derby; error message "Cannot close a connection while a transaction is still active"
Query returs empty list but getting results in TOAD
Hibernate select from a table
Could not parse mapping document from resource com/hib/Unit.hbm.xml
Using Scalars in Hibernate