Bug 340089 - ReportQuery, which selects single Boolean entity attribute does not return rows for "true" result
Summary: ReportQuery, which selects single Boolean entity attribute does not return ro...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 normal with 9 votes (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-15 16:31 EDT by Mitesh Meswani CLA
Modified: 2022-06-09 10:33 EDT (History)
5 users (show)

See Also:


Attachments
testapp sources with build scripts to reproduce the issue. Adjust build.properties and test.properties for your workspace and execute ant run to run the test (5.42 KB, application/x-zip-compressed)
2011-03-15 16:31 EDT, Mitesh Meswani CLA
no flags Details
Patch (629 bytes, patch)
2014-05-23 04:34 EDT, Pascal Gruen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mitesh Meswani CLA 2011-03-15 16:31:47 EDT
Created attachment 191246 [details]
testapp sources with build scripts to reproduce the issue. Adjust build.properties and test.properties for your workspace and execute ant run to run the test

This issue is filled as http://java.net/jira/browse/GLASSFISH-16220

Attached is a test case that reproduces the issue. The root cause of the issue is ReportQuery.buildObjects has following code that ignores  RESULT_IGNORE returned from buildObject.  RESULT_IGNORE is defined as Boolean.TRUE and hence rows returning true are not returned to user.


        for (int index = 0; index < size; index++) {
            // GF_ISSUE_395
            Object result = buildObject((AbstractRecord)rows.get(index), rows);
            if (result != RESULT_IGNORED) {
                containerPolicy.addInto(result, reportResults, this.session);
            }
            //end GF_ISSUE
        }
Comment 1 Tom Ware CLA 2011-03-18 09:51:49 EDT
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 2 Pascal Gruen CLA 2014-05-23 04:34:54 EDT
Created attachment 243429 [details]
Patch

This fixes the bug. If ReportQuery:599 is the only line where this special value is used, the patch is correct. If there are more places where Boolean.TRUE is returned as a special value, these places need to be corrected (to use ReportQuery.RESULT_IGNORED), too.
Comment 3 Sven Merk CLA 2016-02-15 06:19:13 EST
Please check Bug 335797 and vote for it.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:33:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink