| Summary: | Query.setMaxResults(0) returns unexpected results | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | lists |
| Component: | Eclipselink | Assignee: | Project Inbox <eclipselink.documentation-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | acnt4reg, christopher.delahunt |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
lists
From the database perspective of how LIMIT works, this seems reasonable. But from the JPA setMaxResults perspective, it must work the same regardless of the database being used. JPA mandates that setMaxResults() throws IllegalArgumentException if the argument is negative, and is seems modeled after java.sql.Statement's setMaxRows method. Since there is no mechanism to unset maxResults once set, 0 was chosen instead keeping it inline with the previously mentioned setMaxRows method. I have changed this bug to be a documentation bug since I could not find this behavior mentioned in EclipseLink docs. The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |