-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Query skips records
PostPosted: Fri Jan 12, 2007 6:37 am 
Newbie

Joined: Tue May 09, 2006 4:17 am
Posts: 8
I got a problem with a simple query, it seems that Hibernate skips some records. In my case I just want to fetch all records and Hibernate delivers the records with gaps. e.g. I get the invoices 1 2 4 6 8 9 although 3 5 7 are also in the db.

Thanks in advance,
Thomas

Hibernate version: 3.1.3

This is the code which i use to search for invoices.

...
trans = session.beginTransaction();
String queryString;
queryString = "from " + tableName + " where customerName like ? order by id desc";
q = session.createQuery(queryString);
q.setString(0, "%" + query + "%");

result = q.list();

trans.commit();



The MySQL-DB Version
MySQL 5.0.24a


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 13, 2007 10:25 am 
Newbie

Joined: Tue May 09, 2006 4:17 am
Posts: 8
thanks for the plenty of replies!
..and bob's your uncle


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 13, 2007 12:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
If your posting (or a question you are referring to) was not answered by anybody, the possible reasons are:

- http://www.hibernate.org/ForumMailingli ... AskForHelp
- You did not submit enough information
- Nobody knows the answer or has the free time to answer

What you can do now:

- Do the things listed in After Posting
- Add missing and/or more information
- Consider commercial support for guaranteed expert response times

This is a high-traffic forum run by volunteers with hundreds of postings made every day. The community works because people try to help others in their free time. Nobody is paid for this service or has to pay.

You should not expect a timely response and you should not rely on a public community forum for critical cases.

All community members should respect the rules of this forum and treat others like they would prefer to be treated.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.