I have upgraded the application from 7.3 v to 8.5.1v. After upgrade I see a change in query formed by Report definition. It is adding a 'AND pxObjClass ='<class name>' extra condition in table join, which was not the case previously.
The class it is taking in condition is the class of the joining table. I have the query formed like below example:
Select ref.ID, ref.Unit from Data.Table_Ref ref Inner Join Data.Table_Map Map on ((Map.Id = ref.Id) AND Map.pxObjClass='Table-Map) Where (ref.Is_Active='Y')
Here the Data.Table_Map is table mapped to class 'Table-Map' which is class-join to report class 'Table-Ref' mapped to table 'Data.Table_Ref'
As per your post , I compared the generated query of one of the Pega OOTB report definition 'pyReportContentPage' (The report is created in Pega-Notification class , which has class join on Data-Notification-Recipient ) in Pega 7.3.1 and Pega Pega 8.5.1 . In both the environments the generated query includes a joining condition as "PC0"."pxobjclass" = ? AND "RecipientData"."pxobjclass" = ? . Here 'PC0' is the Report Class reference (Pega-Notification) and 'RecipientData ' is the joined class reference (Data-Notification-Recipient) .
What I observed is ,the joining condition includes the pxObjClass of both Joining Class and the Joined class , not just the pxObjClass of the joined class (as mentioned above) .
Please let me know whether you are facing any challenges with the results fetched by the report definition due to the joining condition on pxObjClass .