Error in logs related to unexposed property
SummaryWhen running a report definition with externally mapped properties, an error is generated stating that an externally mapped property is not exposed. However, the report executes correctly and the property has been exposed and optimized for reporting.
Error Messagescom.pega.pegarules.data.internal.rd.reference.InvalidReferenceException: InvalidReferenceException [ExternalProperty] Unexposed properties cannot be selected for classes mapped to external tables
Steps to Reproduce
- Map a property to an external database column and optimize it for reporting (expose it).
- Ensure that property also exists in a descendant class of the Report Definition's class but is not exposed.
- Check the "Report on descendant class instances" option on the Report Definition's Data Access tab and select.
- Run the report.
Root CauseA software use or operation error. As advised by the Help Article "
Report Definition Data Access tab":https://pdn.pega.com/sites/pdn.pega.com/files/help_v722/procomhelpmain.htm#rule-/rule-obj-/rule-obj-report-/rule-obj-report-definition/dataaccess.htmCaution: If descendant classes are in multiple class tables, the query may fail if the referenced properties are not optimized.
ResolutionPerform the following local-change:
Clear the option (if descendant classes are not required) or ensure all references of the property are optimized resolves this error.
Published February 10, 2017 - Updated March 3, 2017