Hibernate: getting too many rows
问题 I have problem with getting rows from my database using Hibernate. When I would like to get only one row, I am receiving 20. When I would like to get all of rows from table with about 1.5k rows, I am receiving exactly 15.2k rows. Entity class of this table has composite primary key. This is my code for getting all rows: Criteria criteria = getSession().createCriteria(type); criteria.setCacheable(true).setCacheRegion(BaseEntity.PACKAGE); criteria.list(); And this is my Entity class: @javax