Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340089

Summary: ReportQuery, which selects single Boolean entity attribute does not return rows for "true" result
Product: z_Archived Reporter: Mitesh Meswani <mitesh.meswani>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P2 CC: ariluoma, pascal.gruen, ruebe356, s.merk, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
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
none
Patch none

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