You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2008/09/11 04:50:44 UTC

[jira] Assigned: (TAPESTRY-2658) HibernateGridDataSource.getAvailableRows should also call applyAdditionalConstraints() to prevent java.lang.IndexOutOfBoundsException

     [ https://issues.apache.org/jira/browse/TAPESTRY-2658?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAPESTRY-2658:
----------------------------------------------

    Assignee: Howard M. Lewis Ship

> 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
>            Assignee: Howard M. Lewis Ship
>            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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org