Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

list() and iterate()  RSS feed

 
Jack Wiesenthaler
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a strange problem with a simple load query. The query returns multiple rows but if I use query.iterate() I get the following error:

INFO: Error performing load command
org.hibernate.HibernateException: More than one row with the given identifier was found: 535, for class: com.InsureSuite.Quote.Driver
at org.hibernate.loader.entity.EntityLoader.load(EntityLoader.java:162)

if I use query.list() and then grab the iterator using List.iterator() it works fine but I get the same exact data for all returned rows. The number of rows returned is consistent with the query but they all contain the same data. Any ideas what is going on?

Thanks very much!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!