Return-Path: X-Original-To: apmail-tapestry-commits-archive@minotaur.apache.org Delivered-To: apmail-tapestry-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5522518F57 for ; Mon, 22 Feb 2016 13:45:25 +0000 (UTC) Received: (qmail 7086 invoked by uid 500); 22 Feb 2016 13:45:21 -0000 Delivered-To: apmail-tapestry-commits-archive@tapestry.apache.org Received: (qmail 6758 invoked by uid 500); 22 Feb 2016 13:45:21 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 5755 invoked by uid 99); 22 Feb 2016 13:45:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Feb 2016 13:45:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 519A42C1F6F for ; Mon, 22 Feb 2016 13:45:20 +0000 (UTC) Date: Mon, 22 Feb 2016 13:45:20 +0000 (UTC) From: "Jochen Kemnade (JIRA)" To: commits@tapestry.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (TAP5-1971) HibernateGridDataSource should include some workaround or protection agains wrong Projections.rowCount() result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/TAP5-1971?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jochen Kemnade updated TAP5-1971: --------------------------------- Labels: bulk-close-candidate (was: ) This issue affects an old version of Tapestry that is not actively developed anymore, and is therefore prone to be bulk-closed in the near future. If the issue still persists with the most recent version of Tapestry (currently 5.4.0, available from Maven Central), please update it as soon as possible and add '5.4.0') to the issue's affected versions. > HibernateGridDataSource should include some workaround or protection agains wrong Projections.rowCount() result > --------------------------------------------------------------------------------------------------------------- > > Key: TAP5-1971 > URL: https://issues.apache.org/jira/browse/TAP5-1971 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-hibernate > Affects Versions: 5.3.3 > Reporter: Andrei Arapov > Priority: Minor > Labels: bulk-close-candidate > > In some cases Hibernate's criteria construction like "criteria.setProjection(Projections.rowCount())" returns wrong number of rows. More specifically, for example, if you have some JPA restrictions in you entity annotations (e.g. > " @ManyToOne > @JoinColumn(name = "USER_ID", nullable = false) <---- this one! > @NonVisual > public UserImpl user; ") > then such restrictions (for USER_ID is not null) will not be taken in account while building "row-count" query. > Vice-versa hibernate will use such restrictions in query for getting LIST of entities. > This behaivour fails, when in entity table appear (e.g. some old) rows with NULL in "USER_ID" (e.g.) columns. > This is known, but not solved problem for Hibernate, see: > https://hibernate.onjira.com/browse/HHH-3238 > https://hibernate.onjira.com/browse/HHH-2787 > https://hibernate.onjira.com/browse/HHH-3206 > https://hibernate.onjira.com/browse/HHH-5719 > https://hibernate.onjira.com/browse/HHH-4829 > https://hibernate.onjira.com/browse/HHH-7438 > There by we go into error in HibernateGridDataSource.getRowValue(int index) method: it throws IndexOutOfBoundsException due to row count number is bigger than actual number of selected rows. -- This message was sent by Atlassian JIRA (v6.3.4#6332)