HibernateGridDataSource.getAvailableRows should also call
applyAdditionalConstraints() to prevent java.lang.IndexOutOfBoundsException
-------------------------------------------------------------------------------------------------------------------------------------
Key: TAPESTRY-2658
URL: https://issues.apache.org/jira/browse/TAPESTRY-2658
Project: Tapestry
Issue Type: Bug
Components: tapestry-hibernate
Affects Versions: 5.0.15
Reporter: Buck O' Five
Priority: Minor
When applying a constraint to HibernateGridDataSource which reduces the number
of rows an java.lang.IndexOutOfBoundsException is thrown because
getAvailableRows() does not take into account the number of rows with the
additional criteria applied.
for example:
Lets say we have a table named foo with 10 entries in it and we extend the
datagrid like so:
// for simplicity this would only return only 1 record in the table
protected void applyAdditionalConstraints(Criteria criteria)
{
criteria.add( Property.forName("id").equals(new Integer(1) );
}
so we end up with getAvilableRows() returning a value of 10 and the results of
prepare() retrieving only 1 row.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]